Descendant combinator in griffel styles #524
-
I am currently working on a project which uses fluent ui and griffel, I have some css code that i would like to replicate in griffel but unsure how to do so. I my situation is using the accordian from fluent, but we have the situation where we have nested accordians which are autogenerated, I need to be able apply the style to the child accordian in the following way, using background colour red as an example .fui-AccordionItem .fui-AccordionItem {
background-color: red;
} Is there a way to achieve the same in griffel? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@Cam-Bloom you can do following ⬇️ globalmakeStyles({
global: {
':global(.item)': {
color: 'red',
},
},
}); .item .fauc13k {
color: red;
} nestedmakeStyles({
global: {
'& .item': {
color: 'red',
},
},
}); .fn4exxb .item {
color: red;
} |
Beta Was this translation helpful? Give feedback.
-
@layershifter Sorry if I am missing something, but have made reproductions of my examples, would you be able to point out where im going wrong, thanks in advance With CSS, what im trying to achieve With Griffel |
Beta Was this translation helpful? Give feedback.
@Cam-Bloom you can do following ⬇️
global
nested