14

Idea to overhaul the CSS !important system...

Allow it to accept a numerical value much like z-index.

But the max !important level is the current year so that the more current your code, the more important it is.

Works based off the last edited date of your files to prevent cheaters.

Comments
  • 3
    Absolutely genius, as CSS doesn't cascade, this is a necessity!
  • 2
    And luckily it's impossible to edit file metadata :l
  • 7
    Absolutely fantastic fucking Idea. But what if there are two competing importants from the same day 😱

    How about the number of exclamation marks to signify the importance additionally.

    Or how about making it comparative:
    1. !important
    2. !importanter
    3. !importanterer
    4. You get the gist
  • 3
    @dodomo
    Another way:
    display: grid !important !super !duper

    Important should be avoidwd in css whenever possible. There are other ways of overriding styles, and I have always found a dickish move whenever a framework includes some !important style.
  • 3
    Nah ma dudes you all get this wrong.

    How about using indention (spaces of course) to do this. The outermost important is the most important (of course)

    1. !important
    2. !important
    3. !important
    4. You get it

    Perfect.
  • 1
    It would alternately be cool if it just let us specify the specificity score it trumps.

    !specific: 1201
  • 2
    You're all crazy. It should be

    !important
    *!important
    **!important

    😂
Add Comment