Skip to content

Ensure proper and stable CSS insertion ordering #3678

@lex111

Description

@lex111

Edit: this issue is now about ensuring that we have a properly specified CSS insertion ordering with the ability to prevent regressions.

For Docusaurus 2.0 (#6113), CSS insertion ordering should become stable and documented. Upgrading Docusaurus should not lead to a different CSS ordering in particular for user-provided custom CSS.

See also #5987 (comment)


Original bug report below:

🐛 Bug Report

During a little refactoring, I realized that the custom CSS files content is not at the end of final CSS file styles.css (as it expected). This makes it impossible to override the Docusaurus component styles without applying the !important rule (which in turn is bad practice).

@slorber could you please investigate this issue? Can we "force" the custom CSS content to be at the end of all other styles?

By the example of Docusaurus website you can see that custom CSS is somewhere in the middle of bundled CSS file.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions