File: parse-interpolation.less

package info (click to toggle)
less.js 3.13.0%2Bdfsg-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,032 kB
  • sloc: javascript: 23,275; makefile: 12; perl: 11; sh: 1
file content (53 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (4)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@inputs: input[type=text], input[type=email], input[type=password], textarea;

@{inputs} {
  &:focus {
    foo: bar;
  }
} 

@classes: .a, .b, .c;

@{classes} {  
  + .z {
    color: blue; 
  }
}

.bar {
  .d@{classes}&:hover, baz {
    color: blue;
  }
}

@c: ~'.a, .b';
@d: ~'.c, .d';
@e: ~' + .e';

@{c}@{d} {
  @{e} {
    foo: bar;
  }
}

@textClasses: ~'&[class="text"], &.text';

input {
  @{textClasses} {
    background: red;
  }
}

@my-selector: ~'.selector-1, .selector-2';
.master-page-1 {
    @{my-selector} {
        background-color: red;
    }
}

@list: apple, satsuma, banana, pear;
@{list} {
  .fruit-& {
    content: "Just a test.";
  }
}