Support for custom platform selector variants #325
Closed
DeveloperBlue
started this conversation in
Ideas
Replies: 2 comments
-
|
I think that you could just add @custom-variant electron (html[data-platform="electron"] &);To your global.css file, instead of having it in generated uniwind.css. Or something like that doesn't work? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thank you, that works! I was worried that the order the custom-variants were defined in mattered, and that it could cause issues like My mistake for the overengineering, and thanks again for your time! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a usecase where I would like to add a custom platform selector for electron, similar to the built-in
ios:*,native:*, andweb:*style selectorse.g.
className='electron:bg-yellow-600'In my own fork, I've just been patching the variants.ts so it adds
@custom-variant electron (html[data-platform="electron"] &);to the generated css for variants and rebuilding.It would be nice to be able to pass something to the uniwind config that lets you add a custom platform resolver. The order a platform resolver is injected also matters (e.g.
electron:*should take precedence overweb:*).Example modification:
Beta Was this translation helpful? Give feedback.
All reactions