unocss / unocss

The instant on-demand atomic CSS engine.

Home Page:https://unocss.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`content-none` not working

CNSeniorious000 opened this issue · comments

UnoCSS version

latest

Describe the bug

prose's backticks on <code> elements can't be removed by [&_code]:(before:content-none after:content-none) or @apply before:!content-none after:!content-none.

Reproduction

unocss playground

System Info

Edge, Windows

Validations

You need to write it like this:

<article prose class="before:[&_code]:content-none after:[&_code]:content-none text-green-300">
  <code>no backticks</code>
</article>

Thanks!

And another issue is, if you open the custom css panel in the playground example I provided, I wrote

.prose code {
  @apply before:!content-none after:!content-none;
}

And I added transformerDirectives in config, but this don't work too. I wonder why this transformer doesn't work

Thanks!

And another issue is, if you open the custom css panel in the playground example I provided, I wrote

.prose code {
  @apply before:!content-none after:!content-none;
}

And I added transformerDirectives in config, but this don't work too. I wonder why this transformer doesn't work

This is because of attributify, you can't really target .prose because the class doesn't exist on the element, it's an attribute.

[prose] code {
  @apply before:content-none after:content-none;
}

or class="prose".