Skip to content

Beautifier spoils pseudo-classes and pseudo-elements inside nested CSS, .userCSS, @supports or @media #1960

@krystian3w

Description

@krystian3w
table {
    tr:not(:nth-child(2), :last-child) {
        display: none
    }
}
@supports not selector(:is(html, body)) {
    @supports selector(:-webkit-any(html, body)) {
        html:root :-webkit-any(:hover, :active, :focus):not([onclick]) {
            cursor: revert !important;
        }
    }
}

@supports selector(:-webkit-any(html, body)) and (not selector(:is(html, body))) {
    html:root :-webkit-any(:hover, :active, :focus):not([onclick]) {
        cursor: revert !important;
    }
}

are malformed into:

table {
    tr:not(:nth-child(2), : last-child) {
        display: none
    }
}
@supports not selector(:is(html, body)) {
    @supports selector(:-webkit-any(html, body)) {
        html:root :-webkit-any(:hover, : active, :focus):not([onclick]) {
            cursor: revert !important;
        }
    }
}

@supports selector(:-webkit-any(html, body)) and (not selector(:is(html, body))) {
    html:root :-webkit-any(:hover, : active, :focus):not([onclick]) {
        cursor: revert !important;
    }
}

Apparently, the first case can be reduced to dropping native nesting support.

The behaviour may be new, as I don't associate it when I wrote such strange CSS for undoing the cursor (nesting the checks instead of combining them in and not).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions