-
Notifications
You must be signed in to change notification settings - Fork 732
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
HelpSource: group CSS colors as variables #6309
base: develop
Are you sure you want to change the base?
Conversation
I refactored HelpSource css files to have all color definitions as variables, at the top of both scdoc.css (for general ui colors) and editor.css (for code blocks). This will make it easier for users to override schelp color schemes, for example to achieve dark mode. Through the process I have removed two rarely used shades of grey, replacing them with others that were more used throughout the docs. I have also removed two unused css definitions from scdoc.css
Hey! :) |
hi @capital-G There are some differences in how we manage classes in these two PRs:
What do you think? |
I've reduced the color palette a tiny bit more and put all color var definitions in scdoc.css, which I think is a good place for the default theme. I'm going through #6095 and I'm willing to help |
7ae3959
to
4d7c6a2
Compare
This is a very helpful change - I need to alter codemirror color schemes in the VSCode plugin for the help docs to be even remotely legible, and I think this gives me an easy way to do so. |
looks good! Someone with css background should review it. |
Thanks everyone! |
Purpose and Motivation
I refactored HelpSource css files to have all color definitions as variables, at the top of both scdoc.css (for general ui colors) and editor.css (for code blocks).
This will make it easier for users to override schelp color schemes, for example to achieve dark mode.
Through the process I have removed two rarely used shades of grey, replacing them with others that were more used throughout the docs.
I have also removed two unused css definitions from scdoc.css.
With this PR it will be easier to define color schemes for scdoc, using the existing "frontend.css" mechanism: a user can create a file called "frontend.css" and put it in
SCDoc.helpTargetDir
. Now instead of having to override all sorts of color definitions, one needs only to override a fixed number of easy to find variable definitions.I've added a note in the documentation, let me know if you happen to know a better place to document this feat.
Here is an example frontend.css, for dark mode:
Types of changes
To-do list