cssoperator-precedencestylish

Stylish CSS has no effect? CSS Order in Stylish?


This is the website's CSS:

.bam_announcement {
    -moz-border-radius:5px;-webkit-border-radius:5px
}

And this is my Stylish CSS:

.bam_announcement {
    -moz-border-radius:0px;-webkit-border-radius:0px
}

But the website is still using 5px.


Solution

  • Because we can't be sure of the order that Stylish CSS will be applied -- relative to page CSS -- Stylish scripts often have to use the !important flag.

    So make your Stylish CSS:

    .bam_announcement {
        -moz-border-radius: 0px !important;
        -webkit-border-radius: 0px !important;
    }
    

    In the rare cases where that doesn't work, see: How to override CSS Background that already has !important? .