css - 在 sass 中 = 是什么意思

标签 css sass

例如下面的 sass。 = 只是@mixin 的简写吗?我似乎无法在谷歌上找到任何关于此的信息

=multi-line-button($base-color)
  +background-clip('padding-box')
  border-width: 1px
  +border-radius(6px)
  border-style: solid
  color: white
  display: block
  margin: 0.2em auto
  padding: 12px 15px
  text-align: center
  text-decoration: none

最佳答案

是的,这是在Sass中定义mixin的方式

不知道如果this article会有帮助

编辑:

以下是相同的

@mixin red-text
  color: #ff0000

=red-text
  color: #ff0000

只需将 +red-text 添加到您的选择器

关于css - 在 sass 中 = 是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5948814/

相关文章:

css - 拉伸(stretch)图像以适应背景 CSS 上的屏幕

sass - Stylelint 禁用规则, "no-descending-specificity"null 不起作用

html - 如何拉伸(stretch)以填充其容器空间?

html - 如何使背景图像 (CSS) 具有响应性?

html - 如何在 html 中获得彼此相邻的 a 标签和 p 标签

css - 通过 CSS 改变垫子分页器背景颜色

css - 带 3 张图像的 Angular 旋转木马

javascript - 从 CSS 模块中访问全局类

javascript - webpack:具有多个文件类型输出的多个输入

css - 速记属性中的 SASS 变量没有空格