Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unocss transformerVariantGroup not work #4231

Closed
a81n9 opened this issue Dec 21, 2024 · 2 comments
Closed

[Bug]: Unocss transformerVariantGroup not work #4231

a81n9 opened this issue Dec 21, 2024 · 2 comments

Comments

@a81n9
Copy link

a81n9 commented Dec 21, 2024

Version

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz
    Memory: 4.99 GB / 15.75 GB
Browsers:
    Edge: Chromium (128.0.2739.63)
    Internet Explorer: 11.0.19041.4355
npmPackages:
    @rsbuild/core: ^1.1.8 => 1.1.10
    @rsbuild/plugin-vue: ^1.0.5

Details

In this way https://rsbuild.dev/guide/basic/unocss
Unocss transformerVariantGroup not work

import { defineConfig, presetUno, transformerVariantGroup } from 'unocss'

export default defineConfig({
  content: {
    filesystem: ['./src/**/*.{html,js,ts,jsx,tsx,vue,svelte,astro}'],
  },
  presets: [presetUno()],
  transformers: [transformerVariantGroup()], // not work
})
<div class="bg-red text-(center white xl)">Rsbuild</div>

Image

The effect of not using transformers is as follows:

<div class="bg-red text-center text-white text-xl">Rsbuild</div>

Image

Reproduce link

https://codesandbox.io/p/github/rspack-contrib/rsbuild-codesandbox-example/main

Reproduce Steps

<div class="bg-red text-(center white xl)">Rsbuild</div>
@chenjiahan
Copy link
Member

This might be an issue with UnoCSS, since Rsbuild only uses UnoCSS as a PostCSS plugin.

Can you file an issue to the unocss repository?

@a81n9
Copy link
Author

a81n9 commented Dec 23, 2024

Yeah, I already did that

@a81n9 a81n9 closed this as completed Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants