How to make the code non-global??

How to make the code non-global?? It keeps saying "Style code looks unintentionally global". Smh.

Comments

  • When importing styles to userstyles.org its important to add a @moz-document at the top of your style. This will indicate what site the style needs to apply on. Not adding this will make it global meaning it will apply on all sites.

    Example, If you want to add a style for google

    @-moz-document domain("google.com") {

    body { background: red; } }

    Example, if you want to add separate styles for the different domains

    @-moz-document domain("google.com/about/products") {

    body { background: red; } }

    @-moz-document domain("google.com/about") {

    body { background: red; } }

    it's important to add the style for each domain with an extra bracket }

    Example

    @-moz-document domain("quizlet.com") {
    .UIButtonWithKeyboardHint .UIButton {
    border: 0.125rem solid #ffffff;
    }
    .UIButton--white {
    background: #1d1c1c !important;
    box-shadow: 0 0 0.25rem #f0f0f0;
    }
    .cart {
    background: #1a1c1c;
    }
    .UIMenuItem-inner {
    color: #fff !important;
    }}

    If there is anything else or need help with getting your code polished.
    Don't be afraid to contact me.

    Discord :

    Trigstur#5919

    Twitter :

    CasualTrig

Sign In or Register to comment.