What does % indicate in scss?
Use of % in context: (source: https://codepen.io/FWeinb/pen/GrpqB?editors=1100)
@import "compass/css3";
.box{
margin: 5em auto;
position: relative;
width: 10em;
height: 10em;
line-height: 10em;
overflow: hidden;
}
%box__dir{
position: absolute;
width: inherit;
height: inherit;
text-align: center;
line-height: inherit;
transition:transform .4s ease;
}
Run Code Online (Sandbox Code Playgroud)
What does the percentage sign before "box_dir" indicate?
我已经在我的项目中使用 SCSS,但我仍然感到困惑。
为什么我们有 SCSS 还要使用 SASS,我们可以在同一个项目中使用 SASS 和 SCSS,它会在同一个项目中工作吗?
我的困惑来自(除了相对较新)术语"Sass"用于指代Sass和SCSS语法.
根据本指南,它们是截然不同的:http://sass-lang.com/guide
因此,在阅读讨论或工作列表时,除非提供语法,否则我不确定他们正在谈论哪种方言.
Sass语法是否已被SCSS语法所取代(反之亦然),并且只属于"Sass"这个总称.
只是想确保我一直在使用,学习是当前的语法.我一直在学习SCSS语法.
我已经开发了大约两年的网站,但我从未使用scss,sass或更少.它们与使用它们的优点有什么区别?