-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use CSS variables in getColor #286
Conversation
Instead of hard-coding colors, use CSS variables so that grades are more visible in dark mode.
This fixes the original issue. But in the process I came across |
Apparently this was added in a43af60 but it seems that it was not used at all then and is not used now, so I think it can be safely deleted (along with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good, but I think it would be good to have a separate color (dark orange?) for D-range grades, both for maintaining consistency (every other letter grade has its own color) and because we shouldn't use red for a D when it is still a passing grade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ready to squash and merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I (semi-)retract my approval. I think it may be a good idea to compute the color first (using the variable), given that the color (as returned by getColor
) will be entered into the JSON export and therefore should be portable.
This would involve re-computing all colors upon switching themes, which might be a little much. @jadebuckwalter Your thoughts?
Or, we could keep using CSS variables within |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the repeated comments. After 3f2819c, I think the status quo with the backwards-compatibility guarantee is the way to go, given that it's the least disruptive solution. @jadebuckwalter, feel free to squash-and-merge if you agree.
Instead of hard-coding colors, use CSS variables so that grades are
more visible in dark mode.