Does Important CSS weigh the site?

Asked

Viewed 29 times

2

I would like to know this... Put put I have a project here that is being needed to use, (really necessary.). Someone would have some answer for that:

Making it clearer, I would like to know if the use of !Important;css decreases performance of the same.

Example:


That one:

.test {
  display block;
}

Spin faster than that?

.teste {
   display: block !Important;
}

If so, would you tell me why?

  • You can better contextualize and illustrate your problem?

  • I edited it to make it clearer.

  • 1

    I venture to say that if your application needs the use of !important it is poorly structured and thus many other points will influence more on the performance than the asked.

  • 2

    Weighs 11 bytes more. P

  • No, @Andersoncarloswoss, it’s straight, but I don’t know why the CSS here isn’t obeying the waterfall. He’s taking what’s on top first, instead of what’s on the bottom.

  • 2

    The !important breaks the cascade and why its use is discouraged. For practical purposes, it is better not to even know that it exists. That’s why I say if you need to use it, the CSS must be wrong. But it’s my opinion.

  • Could you give me a feedback (if possible) if it is badly formatted? https://i.imgur.com/cLRH7bo.png and https://i.imgur.com/Cijlyoa.png put is ok, but as you can see there, every time I have to call a different H1, it doesn’t respect the cascade, so I have to use Important. the big-title use to format the headers. I will maybe take the formatting of the big-title H1

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.