-
Notifications
You must be signed in to change notification settings - Fork 324
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
ENH: simplify color variables #659
Conversation
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 looks really nice - in general the style seems to still look good (IMO) and I really like reducing the number of configuration options to expose.
a few quick thoughts from me:
Header links are in danger color
Why not make these the same color as other links on the page? That way link style within the page is the same for all elements.
Why is there a transition in admonition css
I did a quick look and it seemed fine to me - note that most people are not going to be regularly switching light/dark mode, so IMO it is OK.
code block CSS
there doesn't seem to be any background or shadow for code blocks, which makes it feel much more "flat" on dark mode:
variable naming
What do you think about switching the variable prefix from --pst
to --theme
. That would make it a bit less clunky to sub-theme this one and extend or add your own variables. We could do a deprecation cycle to keep the --pst
variables around if we wanted to.
Because the titles are already blue (primary) so it would be confusing From what I read in the issues, the Pandas theme will be progressively dropped so titles will be blue in both themes eventually. I like the contrast between these 2 items.
My question was more, "I think it's useless can we remove it ?". As you mentioned people are rarely jumping from light to dark so I think this is some legacy code from the inspiration.
I actually like |
Ah yeah - I thin that's fine
My use case is themes that sub-theme this one. In my case, the sphinx book theme (https://sphinx-book-theme.readthedocs.io/). It feels weird to ask users to define some variables as |
add the scroll bar
Anything else you're hoping to tackle in this one? Or are we just waiting for approval and merge @12rambau ? One quick thing: can we update the docs on the theme variables page so it's clearer which variables are the ones we'd like people to update? |
I've updated the documentation with color variables. question: Is it in normal that the other variables are still stored in |
I made some quick updates to the docs, but they look good to me! I am not sure why the other variables are in the @pradyunsg I couldn't find a rationale for leaving some variables in the |
@12rambau Should we merge this before releasing 0.9rc1 later today? If so, would you mind resolving the merge conflicts? |
I'm happy with @jarrodmillman's suggestion in #675 to:
|
I resolved the conflicts in the GitHub editor, I hope linter will not complain. But after that we are good to merge |
issue to track moving the color CSS variables: #676 |
DO NOT merge, the navbar is transparent. I'm correcting it and merging as I have already 2 approvals |
Good catch! I didn't even notice when I scrolled down the page. |
summary
Reduction of the color variables from 79 to 17, respecting the guidelines from material colors.
primary
...danger
) palettebase
,muted
)background
,on-background
,surface
,on-surface
(in depth order)FIx #623, Fix #279
customization
These modifications required some adjustments, in the directive color scheme:
background
andtext-base
(https://pydata-sphinx-theme--659.org.readthedocs.build/en/659/demo/kitchen-sink/paragraph-markup.html#inline-markup)text-base
colordanger
colorinfo
and the background is treated as the admonition one (https://pydata-sphinx-theme--659.org.readthedocs.build/en/659/demo/kitchen-sink/paragraph-markup.html#inline-markup)--pst-color-alert-link
)target
and border colors (https://pydata-sphinx-theme--659.org.readthedocs.build/en/659/_modules/asyncio/events.html#AbstractEventLoop)surface
color is the same asbackground
on light theme (depth is performed by shadows), andsurface
color is the same ason-background
in dark themequestion
Why is there a transition in admonition css (https://pydata-sphinx-theme--659.org.readthedocs.build/en/659/demo/kitchen-sink/paragraph-markup.html#admonitions) ? It creates a funny behavior when switching from light to dark theme (ref). Let me know if you think it should be removed
finally
What do you think ?