📅  最后修改于: 2020-10-20 05:45:16             🧑  作者: Mango
Mixins允许创建一组样式,这些样式可在整个样式表中重复使用,而无需重新创建非语义类。在CSS中,mixins可以存储多个值或参数并调用函数;它有助于避免编写重复的代码。 Mixin名称可以互换使用下划线和连字符。以下是Mixins中存在的指令-
S. No. | Directive & Description |
---|---|
1 | Defining a Mixin
@mixin directive is used to define the mixin. |
2 | Including a Mixin
@include directive is used to include the mixins in the document. |
3 | Arguments
The SassScript values can be taken as arguments in mixins, which is given when mixin is included and available as variable within the mixin. |
4 | Passing Content Blocks to a Mixin
Block of styles are passed to the mixin. |