Skip to content

CSS generated from presetTypography's cssExtend makes ::before impossible #4928

@SharpMars

Description

@SharpMars

UnoCSS version

66.5.1

Describe the bug

cssExtend in presetTypography generates selector in a way that makes it impossible for ::before element to exist.
How it is currently generated:

:is(.prose) {
:where(blockquote > *:first-child::before):not(
      :where([class~='not-prose'], [class~='not-prose'] *)
    ) {}
}

How it should generate:

:is(.prose) {
:where(blockquote > *:first-child):not(
      :where([class~='not-prose'], [class~='not-prose'] *)
    )::before {}
}

How it was generated in 0.62.4:

.prose :where(blockquote > *):not(:where(.not-prose, .not-prose *)):first-child::before {}

Reproduction

https://github.com/SharpMars/unocss-cssextend-pseudoelem-repro

System Info

Windows 11, Firefox 144.0b2, initially noticed in Astro, repro in SolidJS

Validations

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions