What is good/correct/better way to write selector in Vanilla-Extract #1214
Answered
by
askoufis
WreewanMorhee
asked this question in
Q&A
-
I had read doc
|
Beta Was this translation helpful? Give feedback.
Answered by
askoufis
Nov 7, 2023
Replies: 1 comment 1 reply
-
The equivalent Vanilla Extract styles would be: import { globalStyle, style } from "@vanilla-extract/css";
export const first = style({
width: "100vw",
});
export const second = style({
selectors: {
[`${first} &`]: {
height: "auto",
position: "relative",
},
},
});
export const third = style({
selectors: {
[`${first} ${second} &`]: {
width: "50px",
},
},
});
globalStyle(`${first} ${second} ${third} img`, {
opacity: 0.5,
}); A few things to note:
Hope that helps 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
WreewanMorhee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The equivalent Vanilla Extract styles would be:
A few things to note: