unocss / unocss

The instant on-demand atomic CSS engine.

Home Page:https://unocss.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

【Bug? => Next.js & Transformers: Directives, VariantGroup, CompileClass, presetAttributify!】 Insufficient coverage About `presetAttributify` using `AttributifyAttributes` on JSX Element?

zzinx58 opened this issue · comments

UnoCSS version

^0.60.4

image image

Project Framework: Next.js 14.2.3

image

Describe the bug

iShot_2024-06-14_18 18 18 iShot_2024-06-14_18 14 58 iShot_2024-06-14_18 14 45 iShot_2024-06-14_18 14 31

Reproduction

Enabled presetAttributify() plugin in presets Array of uno.config.ts's defineConfig.
Then try to use 2xl="" Responsive Attributes on JSX Element.
And lg:grid="" Which inspires by the Type Defines: type AttributifyNames<Prefix extends string = ''> = ... ${Prefix}${PseudoPrefix}:${BasicAttributes};`

System Info

No response

Validations

Is there a workaround or solution?

Append problem1: transformerVariantGroup() seems not woring in my project.
image
It has no effect.

Append problem2: how can i use transformerDirectives() for my .css files in my React/Next project?
image

image

Under Attributify Mode, Using like this won't work. All attributes linke un-** were properly pass to the target element. Howere it got not effect. But the className prop properly solved and worked. A little confuse here.

image

Project Architecture: Next.js 14.2.3
transformDirectives(): --uno --at-apply --uno-apply not work in css file,while @apply work, but only first line that have content will work, those after will be ignore!

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required