File: css.selector.interpolation.styl

package info (click to toggle)
node-stylus 0.54.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 5,392 kB
  • ctags: 913
  • sloc: makefile: 38
file content (90 lines) | stat: -rw-r--r-- 1,099 bytes parent folder | download | duplicates (8)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
form {'input'}:last-child {
  display: none;
}

form {'input'}:nth-child({10 + 5}) {
  display: none;
}

for n in 1 2 3 4 5 {
  .grid-{n} {
    width: unit(n * 100, 'px');
  }
}

pos = last

body {form} {
  input:{  pos  }-child {
    display: none
  }
}

mixin(n) {
  &:nth-child({ n }) {
    display: none
  }
}

ul li {
  mixin(2);
}

{foo} {bar} {
  foo: bar;
}

{foo} {
  {bar} {
    {baz} {
      foo: bar;
    }
  }
}

{foo} {
  {bar} {
    {baz} {
      {foo}: bar
    }
    {one} 1
  }
  {two} 2
}

selectors = one two three;
props = (one 1) (two 2) (three 3);

for selector in selectors {
  {selector} * {
    for prop in props {
      {prop[0]}: prop[1];
    }
  }
}


li a:active { color: black; background: white; }

state = 'active'
li a:{state} { color: black; background: white; }

.col-{1}-{0} :nth-child(1) { foo: 'bar'; }

cols = 1 2 3

for col in cols
  .col-{col} { foo: 'bar'; }


@media print {
  blockquote { border: 1px solid #999 }
  blockquote {
   border: 1px solid #999
  }
  block{'quote'} { border: 1px solid #999 }
  block{'quote'} {
   border: 1px solid #999
  }
}