Тема: !важливо у стилях
!important
Мабуть будь-хто стикався з цим правилом в стилях. А дехто може навіть використовував його, а то й зловживав. Ось тут чудово розписано, чому це робити не можна https://css-tricks.com/when-using-impor … ht-choice/
The unfortunate typical use case goes like this:
WHY IS MY FRAGGLE ROCKING CSS NOT WORKING INTERROBANG
(use !important rule)
OK, now it's working
Then the next guy comes along and tries to make new changes. He tries to alter some existing CSS rules, but now his changes aren't behaving how they should. He traces the issue back to the !important rules, then has a choice. He can try and remove those and attempt to get things back on track, or add some more of his own to fight them and get his change done. Since he might not know exactly why those !important rules were added in the first place, he might opt for the second option for fear of breaking something somewhere else on the site he's not aware of. And thus the vicious cycle starts.
Так от, признавайтеся, чи хтось використовує це правило ще досі? Якщо так, то для чого?