We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想要实现一个换肤功能, 样式如下:
@a: red; @b: blue; @c: green; .skin-a { .title { color: @a; } .content { color: @a; } } .skin-b { .title { color: @b; } .content { color: @b; } } .skin-c { .title { color: @c; } .content { color: @c; } }
写起来很冗余是不是? 可以利用 mixin 来简化操作
@a: red; @b: blue; @c: green; .skin(@color) { .title { color: @color; } .content { color: @color; } } .skin-a { .skin(@a); } .skin-b { .skin(@b); } .skin-c { .skin(@c); }
带括号的 mixin 是不会输出的
https://www.html.cn/doc/less/features/#mixins-feature-not-outputting-the-mixin-
The text was updated successfully, but these errors were encountered:
No branches or pull requests
想要实现一个换肤功能, 样式如下:
写起来很冗余是不是? 可以利用 mixin 来简化操作
带括号的 mixin 是不会输出的
参考
https://www.html.cn/doc/less/features/#mixins-feature-not-outputting-the-mixin-
The text was updated successfully, but these errors were encountered: