I have some CSS that targets a ::before pseudo element of the <details> element's ::details-content using a selector containing ::details-content::before. It seems to be supported in the major browsers (current versions of Firefox, Safari & Chrome parse and apply those styles - see screenshots below) so I presume this is valid CSS, however lightningcss errors with "Invalid state" when it encounters that.
You can reproduce this in the Lightning CSS Playground with the following code:
::details-content::before {
background-color: red;
}
Given that browsers accept this selector, I think Lightning CSS should be able to handle it and not error, so I think this is a bug.
As promised above, here a screenshot of the various browser dev tools showing this selector working fine:
Firefox (v150)

Chrome (v148)

Safari (v26.4)

I have some CSS that targets a
::beforepseudo element of the<details>element's::details-contentusing a selector containing::details-content::before. It seems to be supported in the major browsers (current versions of Firefox, Safari & Chrome parse and apply those styles - see screenshots below) so I presume this is valid CSS, howeverlightningcsserrors with "Invalid state" when it encounters that.You can reproduce this in the Lightning CSS Playground with the following code:
Given that browsers accept this selector, I think Lightning CSS should be able to handle it and not error, so I think this is a bug.
As promised above, here a screenshot of the various browser dev tools showing this selector working fine:
Firefox (v150)

Chrome (v148)

Safari (v26.4)
