File: mixins-named-args.less

package info (click to toggle)
less.js 1.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,576 kB
  • ctags: 3,819
  • sloc: makefile: 105
file content (36 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.mixin (@a: 1px, @b: 50%) {
  width: (@a * 5);
  height: (@b - 1%);
  args: @arguments;
}
.mixin (@a: 1px, @b: 50%) when (@b > 75%){
  text-align: center;
}
 
.named-arg {
  color: blue;
  .mixin(@b: 100%);
}
 
.class {
  @var: 20%;
  .mixin(@b: @var);
}

.all-args-wrong-args {
  .mixin(@b: 10%, @a: 2px);
}

.mixin2 (@a: 1px, @b: 50%, @c: 50) {
  width: (@a * 5);
  height: (@b - 1%);
  color: (#000000 + @c);
}

.named-args2 {
  .mixin2(3px, @c: 100);
}

.named-args3 {
  .mixin2(@b: 30%, @c: #123456);
}