Search code examples
cssstylesheet

Make entire CSS sheet !important


Is there a way to make an entire CSS Style sheet take precedence over another? I know you can do the !important but can I do that with one line rather than modify all thousand properties on the sheet?

Thanks!


Solution

  • Make sure the stylesheet you want is called last (or a specific style you want is called last). For example, using this:

    span { color: red; }
    span { color: blue; }
    

    ...will turn all text in <span>'s blue. Take a look here.