htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

CSS pseudo class "has()" not supported

Open PHPGangsta opened this issue 1 year ago • 0 comments

Hi!

I have a case with this CSS in an email:

p:has(br:only-child) {
    margin: 0;
    display: none;
}

I'm using $config->set('Filter.ExtractStyleBlocks', true);

The result is:

p {
    margin: 0;
    display: none;
}

Looks like neither "has()" nor ":only-child" is supported? ":first-child" is supported as far as I saw.

Can I add those 2 missing CSS pseudo selectors/classes somehow via configuration?

PHPGangsta avatar Feb 29 '24 14:02 PHPGangsta