在Firefox中为我的userChrome.css
编写CSS代码时,我在使用:is()
伪类来缩短相邻的sibling 组合子表达式时遇到了一个问题.
以下代码不适用于:is()
内的第二个元素,即#tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button
.
#tabbrowser-tabs:not([overflow]) .tabbrowser-tab:not([selected], [multiselected]) + :is(.tabbrowser-tab:not([selected], [multiselected]), #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button) {
border-left: 1px solid rgb(0, 0, 0, .2) !important;
}
但是,删除> #tabs-newtab-button
时,:is()
可以正常工作.然后,它将 Select 元素#tabbrowser-arrowscrollbox-periphery
.
而且,当不像这样使用:is()
伪类时,它可以工作:
#tabbrowser-tabs:not([overflow]) .tabbrowser-tab:not([selected], [multiselected]) + .tabbrowser-tab:not([selected], [multiselected]),
#tabbrowser-tabs:not([overflow]) .tabbrowser-tab:not([selected], [multiselected]) + #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button {
border-left: 1px solid rgb(0, 0, 0, .2) !important;
}
我的问题是:这是意料之中的行为,还是Firefox中:is()
伪类的实现中的错误?