`hidden` does not work for React components in Astro with Attributify preset
TheJiahao opened this issue · comments
UnoCSS version
0.60.4
Describe the bug
hidden
(from Wind preset) does not work as attribute inside a React component in Astro. It works for imported Astro components.
All previous versions since 0.51.0 have the same issue. Earlier versions cannot start Astro server with the same config.
Reproduction
Minimal reproduction, https://stackblitz.com/edit/withastro-astro-7xnewp?file=src%2Fpages%2Findex.astro
- Load React and UnoCSS integrations in
astro.config.ts
- Load presets Wind and Attributify in
uno.config.ts
- Add
un-hidden
to any component inside a React component, (hidden
conflicts with HTML attribute). - Import and use the React component in Astro page file
- Start Astro server with
astro dev
orastro build && astro preview
- See the component not hidden, no
un-hidden
attributes exist produced HTML.
System Info
Astro 4.9.2, React 18.3.1
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Workaround
Add hidden
to classes.