我们如何使用以下操作进行操作:较小的根变量(CSS vars)?
我正在尝试使用更少的根变量进行操作。
例如
:root{
--padding-md: 5px;
}
@padding-md: ~'var(--padding-md)'; // we get the CSS var
@padding-double: @padding-md + 5px; //we try to add 5px
,否则
@padding-md: calc(5px + 3px) + 5px; // we get the CSS var
就丢了OP 这可能吗?怎么做?
有一种方法可以告诉较少设置CSS CANC功能而不是使操作不影响默认的操作?
I´m trying to make operations with the root variables using less.
For example
:root{
--padding-md: 5px;
}
@padding-md: ~'var(--padding-md)'; // we get the CSS var
@padding-double: @padding-md + 5px; //we try to add 5px
Or this
@padding-md: calc(5px + 3px) + 5px; // we get the CSS var
But LESS just throw the op
Is this possible? How to do that?
there is a way to tell to LESS set the CSS CALC function instead make the operations without affect the default less operations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论