【发布时间】:2019-06-21 22:45:05
【问题描述】:
我正在将一个电子应用程序迁移到一个网络浏览器应用程序中,并且遇到了一些我以前从未见过的 scss 样式。 大多数选择器使用没有任何意义的 At-Rule。
它似乎会生成类名,但我很难理解是 SASS 功能还是其他一些库\包。
所有这些@b、@m 对我来说没有任何意义。
我在 Google 上搜索过,但在 SCSS 文档上都找不到更好的信息。
/* Text inputs */
@b textInput {
@include inputBoxStyle;
@m small, s {
padding: 0.5rem;
border-radius: 3px;
}
@m large, l {
padding: 1rem;
font-size: 1.2rem;
border-width: 2px;
border-radius: 5px;
}
@m textOnly {
background-color: transparent;
border: none;
padding: 0 !important;
}
@m invalid, invalid:focus {
border-color: $pastelPink;
}
@e hiddenInteraction:not(:hover):not(:focus):not(:active) {
@include inputHiddenInteraction;
}
}
/* Selects */
@b select {
position: relative;
select {
@include inputBoxStyle;
padding-right: 1.6rem;
appearance: none;
}
&:after {
position: absolute;
top: calc(50% - (1em / 2));
right: 1rem;
font-family: 'FontAwesome', serif;
font-size: 1rem;
line-height: 1em;
content: '\f078';
color: $ourWhite;
pointer-events: none;
}
【问题讨论】: