-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Light switch #464
Light switch #464
Conversation
Move highlighting colours from `code.scss` to `light.scss`. Add GitHub Dark hihlighting colurs to `dark.scss`. Test using `Preview dark...` button in Configuration page.
- Add copies of CSS files from Pygments - Replace GitHub Dark colours in _sass/color_schemes/dark.scss by an import
Implement just-the-docs#234 - Use media queries to choose light or dark color scheme - Update docs and configuration
Note that this PR does not provide a button to toggle between The improved code highlighting for the dark scheme from PR #463 is included in this PR, because it could be very annoying if browsed code becomes significantly less legible due to a system-level switch to dark mode. |
I'm interested in trying this, however I get the following error when I try to use this branch as a remote theme:
When using
in |
- Add the extension `css` to the import filename in `_sass/color_schemes/dark.css`. - Move `@charset "UTF-8";` from `_sass/content.scss` to `_includes/just-the-docs.scss.liquid`. Before these changes, Jekyll 3.8.7 fails to build due to errors about `File to import not found` and `@charset not at the root`, whereas Jekyll 4.1.1 built without errors.
@clberube Thanks for the bug report. The changes that I've just committed should have fixed the issue. In fact I had previously checked locally that the |
@pmarsceill The move of the |
Correct the dark code highlighting: - Omit the `.css` extension in the `@import` in `_sass/color_schemes/dark.scss`. - Change the extension of the imported SCSS file to `scss`. - Remove unused `pygments` folders and files. Dark code highlighting tested with Jekyll 3.8.7 and 4.1.1.
@clberube The previous version didn't provide the intended code highlighting in the dark mode. The above update appears to have fixed that. |
Thank you for the quick fixes, @pdmosses. I confirm my sites are building properly after 19eba11. This and the included changes to the code syntax highlighting for dark mode are great, I hope this can be reviewed soon. |
This PR currently supports switching only between the |
Implement #234