Lobotomized owl selector * + * #883
bartekczyz
started this conversation in
General
Replies: 2 comments 4 replies
-
Selectors of export const stack = recipe({
base: {},
variants: {
orientation: {
horizontal: {},
vertical: {},
},
},
});
// stack({ ... }) returns something like "stack stack_orientation_horizontal"
// Extract the class name for the orientation (stack_orientation_horizontal)
// and use it as a selector.
// Note: this breaks when you add additional variants and use defaultVariants for them
const horizontalStack = stack({ orientation: "horizontal" }).split(" ")[1];
globalStyle(`.${horizontalStack} > * + *`, {
marginLeft: 10,
});
const verticalStack = stack({ orientation: "vertical" }).split(" ")[1];
globalStyle(`.${verticalStack} > * + *`, {
marginTop: 10,
}); |
Beta Was this translation helpful? Give feedback.
2 replies
-
Sprinkles itself is incapable of creating a export let flowSm = style({})
export let flowLg = style({})
globalStyle(`${flowSm} > * + *`, {
marginBlockStart: vars.space.sm
})
globalStyle(`${flowLg} > * + *`, {
marginBlockStart: vars.space.lg
}) |
Beta Was this translation helpful? Give feedback.
2 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.
-
Hello :) Is it possible to somehow use the lobotomized owl selector? I'm trying to implement my
Stack
component, but can't use this selector, because I get this error:The thing is, I have no idea what will be the child classes at this point, so I can't use
parent
andchild
classes here.example:
Beta Was this translation helpful? Give feedback.
All reactions