Skip to content

Regression: CSS file added by extension cannot be overridden by users anymore #12096

@mgeier

Description

@mgeier

Describe the bug

In my concrete case, the CSS file is added with add_css_file()
in my nbsphinx extension: https://github.com/spatialaudio/nbsphinx/blob/53be5e632f0c9483ba65ba6690da9b137f9c1120/src/nbsphinx/__init__.py#L1655

How to Reproduce

Check out https://github.com/spatialaudio/nbsphinx/ and add this to doc/conf.py:

html_static_path = ['my-static-path']

Create a file my-static-path/nbsphinx-gallery.css with some CSS overrides, like e.g. in https://github.com/Substra/substra-documentation/blob/d2785aa82d46686d82ab66d2c24f95af86d28ce6/docs/source/static/nbsphinx-gallery.css.

Run Sphinx.

Look at one of the thumbnail galleries.

Environment Information

Any Sphinx version after ae206694e68bea074aca633ea0d32e9ed882a95f, appearing first in release 7.1.0.

Sphinx extensions

`nbsphinx`, but this should happen with any extension that adds some CSS.

Additional context

This was originally reported here: spatialaudio/nbsphinx#778

I have bisected it, and the culprit is ae20669, which is part of #11415.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy