Skip to content
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

Example to show settings all varialbes at :root explicitly #492

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

agjohnson
Copy link
Contributor

Refs #488, this is the first option. Instead of setting each variable at the
point in time we use it (including lots of duplicates) we set all variables at the
:root in the parent DOM. The drops the need for the intermediate --addons-...
variables and gives a point where these variables can be default in one place.

The downside to this generally is that every variable needs to be defined
outside each addon CSS file. We can avoid this and define variables inside the
addon CSS by extracting what we need from the addon CSS.

There are a few ways to do this too though:

  • Export a variableDefaults using css/CSSStyleSheet from flyout.js. This
    still separates variable definition from CSS variable use.
  • A third CSS file for every addon. Similar to just having a defaults.css but
    we'd have 8 or so of these files instead of one.

humitos and others added 20 commits December 16, 2024 11:44
Use our heuristic to detect the documentation tool/theme and add specific
`--readthedocs-*` CSS variables based on that for known tools/themes.

Reference: readthedocs/readthedocs.org#11849 (comment)
This moves the inner CSS rules from inside the shadow DOM to the parent
DOM. This allows users to still set a `--readthedocs-font-size` and
similar variables.
This moves the inner CSS rules from inside the shadow DOM to the parent
DOM. This allows users to still set a `--readthedocs-font-size` and
similar variables.
Merge branch 'humitos/footer-style' into agj/footer-style
@humitos
Copy link
Member

humitos commented Jan 14, 2025

Would you mind rebasing this PR since it got some conflicts with the last merges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants