-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add some missing variables in light-theme #660
Conversation
Thanks for the PR, could you please attach screen shots? |
That kind of trumps the idea of variable. Could you maybe describe what the problem is ? |
I do not have any strong opinion about CSS variable but in my understanding:
Another fix would have been to ensure that all variables declared in one mode (light vs dark) are declared in the other. |
That's a better fix. You hardcoded a value for the same variables in different places. That precisely the problem variables are supposed to solve :-) |
I'll do it tomorow. Thanks for the feedback! |
25f0ad6
to
0e192dc
Compare
I´ve duplicated missing variables in dark-theme and removing default fallback. I still don´t really understand why: @media (prefers-color-scheme: dark) {
:root { ... } Where values seems "close" to dark theme, but not exactly same.
Yes I agree, but my goal was to provide a quick fix, according to the actual approach. In my opinion: r {
rule: default_value;
rule: var(--var-for-rule);
} is absolutely identical of : r {
rule: var(--var-for-rule, default_value);
} Except that the scond one is working. |
Ok maybe I didn't understand the approach then. But from a maintenance and understanding perspective it looks like a rather bad approach to me, because now you have duplicated the raw value If you use variables, the good strategy in my opinion is to define them in |
No, I think it was my message (the last one) that was not clear. I completely agree that the ideal would be to describe all variables in But this was not what was originally done. So in my first proposal, I "just fixed the code". Now I duplicated the missing variables, as you suggested, and removed the fallbacks. |
Thanks, @xvw! |
IS there a way to force the default theme to be light instead of dark? Generating docs via github pages workfflow leads to docs that have a dark theme. I'm unsure how to change this setting. |
While trying the latest version of Odoc (to test with destructive substitution) I noticed that, on Firefox, some colours were not displayed.
According to https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties, you can directly describe a fallback in the accessor of a variable (and this had already been used for a rule).
After this modification, the output is the same of 1.5.2.