What does three ampersands do in Sass?
Here in a styled-components
context:
const Grid = styled.div`
display: grid;
&&& {
${someFunction}
}
`
Seen in code here: https://github.com/reakit/reakit/blob/website%400.16.0/packages/reakit/src/Grid/Grid.ts#L23
The docs say it is to override any already given styles with a higher specificity, as an alternative to using !important
.
It affects the generated css classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With