cssselect
cssselect copied to clipboard
The specificity computation is wrong for :where and :is
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.