admin管理员组文章数量:1314039
What does three ampersands do in Sass?
Here in a styled-ponents
context:
const Grid = styled.div`
display: grid;
&&& {
${someFunction}
}
`
Seen in code here: .16.0/packages/reakit/src/Grid/Grid.ts#L23
What does three ampersands do in Sass?
Here in a styled-ponents
context:
const Grid = styled.div`
display: grid;
&&& {
${someFunction}
}
`
Seen in code here: https://github./reakit/reakit/blob/website%400.16.0/packages/reakit/src/Grid/Grid.ts#L23
Share Improve this question asked May 28, 2019 at 12:41 Fellow StrangerFellow Stranger 34.1k37 gold badges178 silver badges250 bronze badges 3- it's & parent selector repeating three times, no reason – Vadim Hulevich Commented May 28, 2019 at 12:46
- @VadimHulevich I'm not sure I'm following. Mind writing up an answer? – Fellow Stranger Commented May 28, 2019 at 12:47
-
2
I'm not sure it's valid sass. I just tried to run that, and got the following error:
"&" may only used at the beginning of a pound selector.
. Maybe that repo has got some custom pile options specified somewhere, just looking now... – Alicia Sykes Commented May 28, 2019 at 12:48
1 Answer
Reset to default 10The 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.
本文标签: javascriptTriple ampersand in SassStack Overflow
版权声明:本文标题:javascript - Triple ampersand in Sass - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741959626a2407196.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论