Download
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.

Custom CSS not working online

  • #1688
    Avatar photo[anonymous]

    Hi! I’m using the Mercury theme. I customized style using the Tools > Custom CSS editor

    I’ve syncked my website in my hosting, everything uploaded everything but it doesn’t reflect the css customization.

    When I preview the website locally, everything is great, but when is online, not custom css is working.

    #1691
    Avatar photoBob

    cache?

    #1692
    Avatar photo[anonymous]

    Nope, already tried that.

    Actually, I uploaded the site with the custom css already working locally (still works –locallly–), but online, it doesn’t.

    Tried it in different browsers. Is just like the custome css doesn’t exist at all.

    I must say I am not at all savvy in this matter, is my first time using Publii (loved it!) and english is not my native language.

    Thanks for your help, in advance!

    #1693
    Avatar photoBob

    any URL?

    #1694
    Avatar photo[anonymous]
    #1695
    Avatar photoBob

    and the screenshot of the Custom CSS area.

    #1696
    Avatar photo[anonymous]

    Thank you for your patience!

    #1698
    Avatar photoBob

    The style.css file does not contain your CSS rules (that should be attached at the end of the style.css file), so I suppose this is a server cache problem, especially since it works locally.

    #1699
    Avatar photo[anonymous]

    Ok, let me see if I understand correctly. This phrase: <span style=”color: #0000ff;”>”The style.css file does not contain your CSS rules (that should be attached at the end of the style.css file)”</span> means that, when I sync my site to my web server, Publii puts my custom rules at the end of the CSS file ¿right?

    And, since those rule are not there, that means I should contact my hosting provider, and they are the one that might help me solving the caché problem?

    #1700
    Avatar photoBob
    [anonymous] wrote:

    when I sync my site to my web server, Publii puts my custom rules at the end of the CSS file

    Exactly yes.

    #1701
    Avatar photo[anonymous]

    The only thing that worries me, and sorry for insisting is that the custom rules where there BEFORE I ever uploaded the site, so there is no previous version of the css style (the “original”).

    I¡ve attached the style.css I have in my Documents/Publii/sites… (etc.) local folder

    #1703
    Avatar photo[anonymous]

    OK, Bob!

    I manually uploaded the style.css file and everything is working now.

    Thank you so much for your help.

    I’m proceeding to donate.

    Cheers!

    #1704
    Avatar photoBob

    The style.css file is built from the following files: main.css + visual-override.js + custom.css.

    So, the custom.css rules should be located at the end of the style.css – if it works for you locally all work as should.

    #1707
    Avatar photoBob

    Thank you for your donation, I really appreciate it.