We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Publii Overwrites style.css in simple-override/assets/css/ directory

  • #6237
    Avatar photo[anonymous]

    This may be my misunderstanding but if one alters the style.css file and places it in the override directory, it should not be written to by Publii.

    To reproduce the issue using the Simple theme, write the override style.css file in unminified form.

    Place the file in the override directory.

    “Preview Your Changes”

    Check the style.css file. It has been re-written in minified form and at the same time Publii has re-written all changes to return them back to the values in the original style.css file.

    Should the style.css file in the theme directory be removed to stop this from happening?

    Avatar photoBob

    Never override style.css as this is the output file, instead, you should use main.css.

    The style.css is a sum of:

    1. theme-variables.js output
    2. main.css
    3. GDPR popup CSS
    4. visual-overrides.js output
    5. custom CSS

    More about how the Publii renders the theme files:

    Avatar photo[anonymous]

    Many thanks! That helps a lot.