트위터 부트 스트랩의 2.0-wip 브랜치를 살펴본 결과, 변수와 믹스 닝을 묶을 수있는 방법이 없다는 것을 알게되었습니다. 아래 예제 코드를 참조하십시오.LESS의 네임 스페이스 인 SCSS는 클래스 묶음
#font {
#family {
.serif() {
font-family: Georgia, "Times New Roman", Times, serif;
}
.sans-serif() {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.monospace() {
font-family: Menlo, Monaco, Courier New, monospace;
}
}
.shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
font-size: @size;
font-weight: @weight;
line-height: @lineHeight;
}
.serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .serif;
#font > .shorthand(@size, @weight, @lineHeight);
}
.sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .sans-serif;
#font > .shorthand(@size, @weight, @lineHeight);
}
.monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .monospace;
#font > .shorthand(@size, @weight, @lineHeight);
}
}
해당 SCSS는 무엇입니까? 위의 내용을 SCSS에 어떻게 다시 써야합니까?
모든 업데이트? 그것의 2016 – harshitgupta
오! 이것은 수년 전의 실입니다. Btw, Sass에서 네임 스페이스 지정에 대한 아이디어가 있습니다 - https://changelog.com/namespace-support-is-being-added-to-sass/ – Brajeshwar