forked from mirror/earl-grey
Need script to generate auto.css #6
Labels
No Label
bug
dark
enhancement
light
needs testing
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: crystal/committed-violet#6
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
This theme supports both light and dark mode. Normally, switching between the two modes requires having the css files for both modes installed and manually selecting which one you want in user's appearance settings. It is possible to combine both modes into a single css file that will automatically select the correct mode depending on the user's operating system or browser preferences using CSS media queries. This is how the
auto
theme on CrystalCommit works.The different modes are deliberately stored in two different files to allow the user to override the automatic mode by selecting the respective option in their appearance settings, for example if they would like to use the dark theme and their browser does not support the
prefers-color-scheme
media query. I do not want to ship theauto.css
in the repository because it's contents are basically just the two existing files combined together, thus further commits would require two identical copies of each changed line.It is very easy to generate the
auto.css
from the existing files. You must simply place the contents of of the light mode file into a new file, add the appropriate media query to the end, and place the contents of the dark mode file into the media query section. This issue shall stay open until I have created agen-auto.sh
script to automate this process.