Sign in

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

  • This topic has 2 replies, 2 voices, and was last updated 2 years, 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6237
    Avatar photoGoFaster

    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?

     

    #6240
    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: https://getpublii.com/dev/how-the-theme-is-rendered/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6242
    Avatar photoGoFaster

    Many thanks! That helps a lot.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.