#id#id : Repeated occurrences of the same simple selector should increase specificity but don't for IDs in IE9

前端 未结 1 655
死守一世寂寞
死守一世寂寞 2020-12-19 15:46

For some time now I\'m using a little trick that I thought was smart.

That is combining the same css selector to add specificity to the rule\'s selector.

相关标签:
1条回答
  • 2020-12-19 16:07

    Yes, judging by the behavior shown in F12, this is definitely a bug. It's also a violation of the spec, if you interpret "do increase specificity" as "must increase specificity". This issue seems to only affect ID selectors. Class selectors, attribute selectors and pseudo-classes are OK.

    This appears to have been reported before as when I search Microsoft Connect, it turns up an existing report, but I can't view it for some reason. The issue is still present in IE11; if you can't view the report either, feel free to file another one.

    0 讨论(0)
提交回复
热议问题