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

arbitrary add_css_file attributes are not supported #1100

Closed
gmarull opened this issue Mar 24, 2021 · 1 comment · Fixed by #1512 or #1519
Closed

arbitrary add_css_file attributes are not supported #1100

gmarull opened this issue Mar 24, 2021 · 1 comment · Fixed by #1512 or #1519
Labels
Bug A bug Needed: replication Bug replication is required

Comments

@gmarull
Copy link

gmarull commented Mar 24, 2021

Problem

It is sometimes necessary to add a CSS file with attributes such as media (for print, dark mode, etc.). As of today, this is not possible when using sphinx_rtd_theme because attributes seem to be ignored (excepting title): https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/layout.html#L27

Reproducible Project

Create a custom CSS file and add it to your project like this:

app.add_css_file("css/my_customization.css", media="print")

In the example above, media attribute is ignored on the rendered pages.

Error Logs/Results

N/A

Expected Results

All attributes given to CSS files should be taken into account.

Environment Info

  • Python Version: 3.8.5
  • Sphinx Version: 3.5.3
  • RTD Theme Version: 0.5.1
@humitos
Copy link
Member

humitos commented Aug 29, 2023

Done in #1519

@humitos humitos closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: replication Bug replication is required
Projects
None yet
2 participants