-
Notifications
You must be signed in to change notification settings - Fork 2
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
Customization via CSS variables #197
Comments
I think we could have stuff like I think that should suffice. I don't think we need a more clever approach than that. |
@zanderle sounds good to me! I'm assigning this issue to you to work on when you have time 👍🏼 |
Note there are other properties that need to be adjusted as well. For example the |
Could use something like the following to make all the readthedocs-notification {
font-size: 16px;
}
readthedocs-flyout {
font-size: 18px;
} |
Here is another example that doesn't look good when updating CSS variable for notification: https://sphinx-extensions--47.org.readthedocs.build/en/47/ Note that I made the font-size smaller, but the icon size and the padding need to be updated accordingly as well. |
This issue has a generic title but the description only mentions flyout. Is this the right issue to talk about making everything customizable using CSS variables? Because that’s what I want. The alternative is the the frustrating task of overriding specific properties of specific classes and have that break whenever the upstream repository changes how it does things (e.g. if this repo switches |
I've been using
--readthedocs-flyout-font-size
and--readthedocs-notification-font-size
and I found them pretty good. Mainly the ones for flyout since by defining one variable the rest of font-sizes are calculated based on only that variable. This is thank to the PR #181However, we may need to calculate other variables based on a global setting. For example
line-height
and similar stuffs. Otherwise, when reducing thefont-size
it looks weird since theline-height
is not reduced:Normal style
Using
--readthedocs-notification-font-size: 0.8rem
It's clear how the
line-height
is bigger in the Material for MkDocs example.Questions:
line-height
as well? (e.g.--readthedocs-flyout-line-height
)The text was updated successfully, but these errors were encountered: