Semantic-ui: Important in css

Created on 16 Sep 2015  路  1Comment  路  Source: Semantic-Org/Semantic-UI

I see lots of important in css. Is it not considered an antipattern? Making it hard to overwrite.

Discussion

>All comments

Please check my other threads where I've posted on this. CSS should have a specificity property for defining priority (it was part of the original discussion when creating css), however they left us with automatic weight calculations from an arbitrary point system.

This is pretty terrible when you run into something that happens to be classified less ".ui.button" lets say, having to override '.ui.menu .ui.button' , there are only two solutions, arbitrarily increasing weight by repeating class names in selectors, or using important.

I hope someday they resolve this by allowing a weight to be specified in the same vein as z-index. But this is currently not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Morrolan picture Morrolan  路  3Comments

ghost picture ghost  路  3Comments

larsbo picture larsbo  路  3Comments

guilhermeblanco picture guilhermeblanco  路  3Comments

batata004 picture batata004  路  3Comments