编程语言/less:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
创建页面,内容为“== 引言 == == Logical Functions == === if === {{leftrightflex|<syntaxhighlight lang="less"> @some: foo; div { margin: if((2 > 1), 0, 3px); color: if((isc…”
 
Kangkk​(留言 | 贡献)
第2行: 第2行:
== Logical Functions ==
== Logical Functions ==
=== if ===
=== if ===
{{leftrightflex|<syntaxhighlight lang="less">
{{hcdiff|head=if函数|output=<syntaxhighlight lang="less">
@some: foo;
@some: foo;


第8行: 第8行:
     margin: if((2 > 1), 0, 3px);
     margin: if((2 > 1), 0, 3px);
     color:  if((iscolor(@some)), @some, black);
     color:  if((iscolor(@some)), @some, black);
}</syntaxhighlight>|{{consoleout|<syntaxhighlight lang="css">
}</syntaxhighlight>|output2=<syntaxhighlight lang="css">
@some: foo;
@some: foo;


第14行: 第14行:
     margin: if((2 > 1), 0, 3px);
     margin: if((2 > 1), 0, 3px);
     color:  if((iscolor(@some)), @some, black);
     color:  if((iscolor(@some)), @some, black);
}</syntaxhighlight>}}}}
}</syntaxhighlight>}}

2022年8月1日 (一) 11:11的版本

引言

Logical Functions

if

if函数
@some: foo;

div {
    margin: if((2 > 1), 0, 3px);
    color:  if((iscolor(@some)), @some, black);
}
@some: foo;

div {
    margin: if((2 > 1), 0, 3px);
    color:  if((iscolor(@some)), @some, black);
}