cssselect icon indicating copy to clipboard operation
cssselect copied to clipboard

The specificity computation is wrong for :where and :is

Open stof opened this issue 2 years ago • 0 comments

The nodes implemented in the parser don't represent :is(<selector_list>) and :where(<selector_list>) but <selector>:is(<selector_list>) and <selector>:where(<selector_list>). The computation of the specificity loses the specificity of <selector>.

Note: I discovered that mistake while reviewing https://github.com/symfony/symfony/pull/48803 as the symfony/css-selector PHP package is mostly a PHP port of this package.

stof avatar Jan 04 '23 11:01 stof