Skip to content
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

Custom scheme combination #483

Open
pdmosses opened this issue Nov 14, 2020 · 0 comments · May be fixed by #1232
Open

Custom scheme combination #483

pdmosses opened this issue Nov 14, 2020 · 0 comments · May be fixed by #1232
Labels
enhancement status: wip Issues being worked on by someone.

Comments

@pdmosses
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The configuration parameter color_scheme can be set to light or dark. It can also be set to a custom scheme, which may override theme variables to change spacing (e.g., wider main content), etc. To combine dark with such a custom scheme, however, it is necessary to define that combination as a new custom scheme. With a larger collection of custom schemes, naming and defining all their possible combinations would be impractical.

Describe the solution you'd like
Introduce a new configuration parameter custom_schemes that can be set to a list of custom scheme names. The listed custom schemes are loaded after the selected color_scheme, in the listed order. The custom schemes are to be defined a new _sass/custom_schemes/folder.

For example, the following configuration would combine the dark color scheme with custom schemes for wider main content and left-aligned pages:

color_scheme: dark
custom_schemes:
  - wider
  - left-align

or equivalently:

color_scheme: dark
custom_schemes: [wider, left-align]

Describe alternatives you've considered
The list of custom schemes could be encoded as a string, and set as a single color_scheme parameter, e.g.:

color_scheme: "dark, wider, left-align"

But that does not seem to have any significant advantages over the proposed use of a YAML list/array. Moreover, it is strange to insist on referring to all custom schemes as color schemes when they can be independent of colors.

Additional context
Proper color schemes should define a (harmonious!) selection of colours for all rendered elements. Such schemes are alternatives, so combination of different color schemes is not needed. For example, the light and dark color schemes are not intended to be combined. (The proposed light-or-dark color scheme uses media preferences to choose between the alternatives.) Currently, the dark color scheme does not redefine the colors for highlighted code; that has been raised as a separate issue.

@mattxwang mattxwang linked a pull request Apr 20, 2023 that will close this issue
@mattxwang mattxwang added the status: wip Issues being worked on by someone. label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement status: wip Issues being worked on by someone.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants