What is the most character-efficient way to increase CSS specificity?

后端 未结 3 1530
北海茫月
北海茫月 2020-12-15 07:59

If I want to increase the CSS specificity of a rule, I tend to prefix with html, but I wonder if there are more concise ways of doing this?

(It may seem

3条回答
  •  借酒劲吻你
    2020-12-15 08:56

    I've seen a postcss library use :not(#\9) which is pretty short, increases specificity by one, and basically works on everything. Doesn't work with ie8 or less, but come on this is 2020

提交回复
热议问题