CSS attribute selector + descendant gives a bug in Webkit?

后端 未结 4 2014
栀梦
栀梦 2021-01-11 19:25

Consider this CSS:

[data-color=\"red\"] h1 {
background-color:red;
}

[data-color=\"blue\"] h1 {
background-color:blue;
}

And this HTML:

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-11 19:44

    The first jsFiddle is broken in my Chrome 12.0.742.112 (stable).

    However, it works in my Chrome 14.0.803.0 dev-m.

    So, they're already aware of and have fixed the bug. You just have to wait for the fix to land in the stable channel.

    I'll try to find a link to a bug report, if one exists.

提交回复
热议问题