快速入门
概览
变量(Variables)
混合(Mixins)
嵌套(Nesting)
运算(Operations)
转义(Escaping)
函数(Functions)
命名空间和访问符
映射(Maps)
作用域(Scope)
注释(Comments)
导入(Importing)
Less.js 用法
命令行用法
浏览器使用
Less.js选项
预装插件
程序化使用
API
Contributing to Less.js
Less 函数手册
逻辑函数
字符串函数
列表函数
数学函数
类型函数
其他功能
颜色定义函数
颜色通道函数
颜色操作函数
颜色混合函数
进阶指南
合并
父选择器
扩展
变量
Mixins
CSS Guards
Detached Rulesets
@import At-Rules
@plugin At-Rules
Maps (NEW!)
Less入门文档
网站首页
合并
Combine properties The `merge` feature allows for aggregating values from multiple properties into a comma or space separated list under a single property. `merge` is useful for properties such as background and transform. ### Comma Append property value with comma Released v1.5.0 Example: ```less .mixin() { box-shadow+: inset 0 0 10px #555; } .myclass { .mixin(); box-shadow+: 0 0 20px black; } ``` Outputs ```less .myclass { box-shadow: inset 0 0 10px #555, 0 0 20px black; } ``` ### Space Append property value with space Released v1.7.0 Example: ```less .mixin() { transform+_: scale(2); } .myclass { .mixin(); transform+_: rotate(15deg); } ``` Outputs ```less .myclass { transform: scale(2) rotate(15deg); } ``` To avoid any unintentional joins, merge requires an explicit `+` or `+_` flag on each join pending declaration.
上一篇:
扩展
下一篇:
Mixins