Site logo

[Resolved] Can't save linear-gradient in Simple CSS

Home Forums Support [Resolved] Can't save linear-gradient in Simple CSS

Home Forums Support Can't save linear-gradient in Simple CSS

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #202351
    gk

    Hi Tom – I am trying to put a linear-gradient background in the menu – something like:

    .inside-navigation {
    background: linear-gradient(to bottom, #1e5799 25%, #2989d8);
    }

    Using Simple CSS, when I try to save the css, I get sent to an error page. If I remove the “25%” parameter, then it saves correctly. I tried putting this rule (with the “25%”) directly into style.css, and it displays correctly.

    Any idea why I can’t save this in Simple CSS?

    Thanks.

    #202378
    Tom
    Lead Developer
    Lead Developer

    What’s the error message?

    It’s most likely the sanitization that happens before the data is saved to the database – this is a good thing for security.

    However, obviously in this case it’s a little too aggressive as that’s perfectly good CSS.

    I’ll look into it 🙂

    #202523
    gk

    Here is the error message:

    I have trued several css plugins, and they all fail with the “25%” parameter. If I change it to “25px”, then it saves correctly.

    #202525
    gk

    The link was stripped out – try this: https://snag.gy/HKnuTX.jpg

    #202600
    Tom
    Lead Developer
    Lead Developer

    Interesting, I just tried it on my localhost:

    http://screencast.com/t/O1OhcXQL9j
    http://screencast.com/t/CqvdsuJyIp6

    There must be some sort of server setting causing the issue for you.

    Do you have access to your error_log file? If not, can you ask your hosting if they’re seeing anything in it?

    #202641
    gk

    I contacted my host and this was their answer:

    “The issue was caused by mod security web application firewall. I have now disabled a mod security rule for your domain. Please try now.”

    The css save is now working correctly.

    Thanks for your help Tom.

    #202657
    Tom
    Lead Developer
    Lead Developer

    Glad you got it sorted – thanks for sharing the solution 🙂

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