Skip to content

3.3.1 not handling pseudo-elements properly #10960

Closed
@codepic

Description

@codepic

What version of Tailwind CSS are you using?

3.3.1

What build tool (or framework if it abstracts the build tool) are you using?

tailwindcss

What version of Node.js are you using?

v18.14.0

Steps to Repro

mkdir repro
cd repro
yarn global add [email protected]
tailwindcss init

Create repro.css with the following content:

@config 'tailwind.config.js';
::deep [a] {
    @apply bg-white;
}

Run tailwindcss --input .\repro.css --output .\result.css

/* result.css / Incorrect */
[a]::deep {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity))
}

You can fix this by downgrading tailwindcss to 3.3.0:

yarn global add [email protected]
tailwindcss --input .\repro.css --output .\result.css

And the CORRECT output

/* Correct! */
::deep [a] {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity))
}

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