less 2.0.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. data/.gitmodules +0 -3
  2. data/.travis.yml +10 -0
  3. data/README.md +1 -1
  4. data/Rakefile +2 -0
  5. data/bin/lessc +21 -2
  6. data/less.gemspec +5 -3
  7. data/lib/less/defaults.rb +13 -0
  8. data/lib/less/js/CHANGELOG +41 -0
  9. data/lib/less/js/Makefile +21 -2
  10. data/lib/less/js/benchmark/benchmark.less +11 -11
  11. data/lib/less/js/benchmark/less-benchmark.js +3 -5
  12. data/lib/less/js/bin/lessc +52 -18
  13. data/lib/less/js/build/amd.js +6 -0
  14. data/lib/less/js/build/require-rhino.js +7 -0
  15. data/lib/less/js/dist/{less-1.0.44.js → less-1.1.4.js} +159 -45
  16. data/lib/less/js/dist/less-1.1.4.min.js +16 -0
  17. data/lib/less/js/dist/less-1.1.5.js +2805 -0
  18. data/lib/less/js/dist/less-1.1.5.min.js +9 -0
  19. data/lib/less/js/dist/less-1.1.6.js +3004 -0
  20. data/lib/less/js/dist/less-1.1.6.min.js +9 -0
  21. data/lib/less/js/dist/less-1.2.0.js +3293 -0
  22. data/lib/less/js/dist/less-1.2.0.min.js +9 -0
  23. data/lib/less/js/dist/less-1.2.1.js +3318 -0
  24. data/lib/less/js/dist/less-1.2.1.min.js +9 -0
  25. data/lib/less/js/dist/less-1.2.2.js +3337 -0
  26. data/lib/less/js/dist/less-1.2.2.min.js +9 -0
  27. data/lib/less/js/dist/less-1.3.0.js +3478 -0
  28. data/lib/less/js/dist/less-1.3.0.min.js +9 -0
  29. data/lib/less/js/dist/less-rhino-1.1.3.js +2460 -0
  30. data/lib/less/js/dist/less-rhino-1.1.5.js +2481 -0
  31. data/lib/less/js/lib/less/browser.js +38 -27
  32. data/lib/less/js/lib/less/colors.js +151 -0
  33. data/lib/less/js/lib/less/cssmin.js +355 -0
  34. data/lib/less/js/lib/less/functions.js +61 -7
  35. data/lib/less/js/lib/less/index.js +48 -37
  36. data/lib/less/js/lib/less/parser.js +327 -120
  37. data/lib/less/js/lib/less/rhino.js +62 -0
  38. data/lib/less/js/lib/less/tree/alpha.js +1 -1
  39. data/lib/less/js/lib/less/tree/anonymous.js +1 -1
  40. data/lib/less/js/lib/less/tree/assignment.js +17 -0
  41. data/lib/less/js/lib/less/tree/call.js +7 -4
  42. data/lib/less/js/lib/less/tree/color.js +9 -6
  43. data/lib/less/js/lib/less/tree/comment.js +1 -1
  44. data/lib/less/js/lib/less/tree/condition.js +42 -0
  45. data/lib/less/js/lib/less/tree/dimension.js +16 -1
  46. data/lib/less/js/lib/less/tree/directive.js +4 -2
  47. data/lib/less/js/lib/less/tree/element.js +20 -5
  48. data/lib/less/js/lib/less/tree/expression.js +2 -2
  49. data/lib/less/js/lib/less/tree/import.js +16 -14
  50. data/lib/less/js/lib/less/tree/javascript.js +1 -1
  51. data/lib/less/js/lib/less/tree/keyword.js +12 -2
  52. data/lib/less/js/lib/less/tree/media.js +114 -0
  53. data/lib/less/js/lib/less/tree/mixin.js +49 -20
  54. data/lib/less/js/lib/less/tree/operation.js +1 -1
  55. data/lib/less/js/lib/less/tree/paren.js +16 -0
  56. data/lib/less/js/lib/less/tree/quoted.js +2 -2
  57. data/lib/less/js/lib/less/tree/rule.js +8 -4
  58. data/lib/less/js/lib/less/tree/ruleset.js +49 -12
  59. data/lib/less/js/lib/less/tree/selector.js +18 -4
  60. data/lib/less/js/lib/less/tree/url.js +2 -2
  61. data/lib/less/js/lib/less/tree/value.js +1 -1
  62. data/lib/less/js/lib/less/tree/variable.js +5 -3
  63. data/lib/less/js/lib/less/tree.js +6 -2
  64. data/lib/less/js/package.json +2 -2
  65. data/lib/less/js/test/css/colors.css +16 -0
  66. data/lib/less/js/test/css/comments.css +9 -5
  67. data/lib/less/js/test/css/css-3.css +18 -2
  68. data/lib/less/js/test/css/css-escapes.css +1 -1
  69. data/lib/less/js/test/css/css.css +11 -4
  70. data/lib/less/js/test/css/functions.css +13 -0
  71. data/lib/less/js/test/css/ie-filters.css +5 -0
  72. data/lib/less/js/test/css/import.css +12 -3
  73. data/lib/less/js/test/css/media.css +60 -2
  74. data/lib/less/js/test/css/mixins-args.css +17 -2
  75. data/lib/less/js/test/css/mixins-guards.css +58 -0
  76. data/lib/less/js/test/css/mixins-important.css +17 -0
  77. data/lib/less/js/test/css/mixins-pattern.css +4 -6
  78. data/lib/less/js/test/css/mixins.css +21 -0
  79. data/lib/less/js/test/css/operations.css +3 -0
  80. data/lib/less/js/test/css/parens.css +1 -1
  81. data/lib/less/js/test/css/rulesets.css +6 -2
  82. data/lib/less/js/test/css/scope.css +6 -6
  83. data/lib/less/js/test/css/selectors.css +38 -1
  84. data/lib/less/js/test/css/strings.css +6 -4
  85. data/lib/less/js/test/css/variables.css +3 -0
  86. data/lib/less/js/test/css/whitespace.css +5 -3
  87. data/lib/less/js/test/less/colors.less +19 -0
  88. data/lib/less/js/test/less/comments.less +8 -6
  89. data/lib/less/js/test/less/css-3.less +10 -0
  90. data/lib/less/js/test/less/css.less +4 -0
  91. data/lib/less/js/test/less/functions.less +15 -1
  92. data/lib/less/js/test/less/ie-filters.less +8 -0
  93. data/lib/less/js/test/less/import/import-test-e.less +2 -0
  94. data/lib/less/js/test/less/import.less +4 -1
  95. data/lib/less/js/test/less/media.less +55 -1
  96. data/lib/less/js/test/less/mixins-args.less +20 -1
  97. data/lib/less/js/test/less/mixins-guards.less +94 -0
  98. data/lib/less/js/test/less/mixins-important.less +18 -0
  99. data/lib/less/js/test/less/mixins-pattern.less +3 -0
  100. data/lib/less/js/test/less/mixins.less +20 -0
  101. data/lib/less/js/test/less/operations.less +4 -0
  102. data/lib/less/js/test/less/selectors.less +31 -0
  103. data/lib/less/js/test/less/strings.less +2 -0
  104. data/lib/less/js/test/less/variables.less +4 -0
  105. data/lib/less/js/test/less-test.js +3 -5
  106. data/lib/less/loader.rb +24 -25
  107. data/lib/less/parser.rb +32 -6
  108. data/lib/less/version.rb +1 -1
  109. data/lib/less.rb +7 -8
  110. data/spec/less/faulty/faulty.less +3 -0
  111. data/spec/less/parser_spec.rb +28 -2
  112. metadata +321 -149
@@ -1,26 +1,24 @@
1
1
  .zero {
2
+ variadic: true;
2
3
  zero: 0;
3
4
  one: 1;
4
5
  two: 2;
5
6
  three: 3;
6
7
  }
7
8
  .one {
8
- zero: 0;
9
+ variadic: true;
9
10
  one: 1;
10
11
  one-req: 1;
11
12
  two: 2;
12
13
  three: 3;
13
14
  }
14
15
  .two {
15
- zero: 0;
16
- one: 1;
16
+ variadic: true;
17
17
  two: 2;
18
18
  three: 3;
19
19
  }
20
20
  .three {
21
- zero: 0;
22
- one: 1;
23
- two: 2;
21
+ variadic: true;
24
22
  three-req: 3;
25
23
  three: 3;
26
24
  }
@@ -48,3 +48,24 @@
48
48
  .direct {
49
49
  border-style: dotted;
50
50
  }
51
+ .bo,
52
+ .bar {
53
+ width: 100%;
54
+ }
55
+ .bo {
56
+ border: 1px;
57
+ }
58
+ .ar.bo.ca {
59
+ color: black;
60
+ }
61
+ .jo.ki {
62
+ background: none;
63
+ }
64
+ .extended {
65
+ width: 100%;
66
+ border: 1px;
67
+ background: none;
68
+ }
69
+ .foo .bar {
70
+ width: 100%;
71
+ }
@@ -26,6 +26,9 @@
26
26
  .shorthands {
27
27
  padding: -1px 2px 0 -4px;
28
28
  }
29
+ .rem-dimensions {
30
+ font-size: 5.5rem;
31
+ }
29
32
  .colors {
30
33
  color: #123;
31
34
  border-color: #334455;
@@ -1,5 +1,5 @@
1
1
  .parens {
2
- border: 2px solid black;
2
+ border: 2px solid #000000;
3
3
  margin: 1px 3px 16 3;
4
4
  width: 36;
5
5
  padding: 2px 36px;
@@ -13,7 +13,9 @@
13
13
  #first > .one > #second .two > #deux #third:focus #fifth > #sixth .seventh #eighth + #ninth {
14
14
  color: purple;
15
15
  }
16
- #first > .one > #second .two > #deux #fourth, #first > .one > #second .two > #deux #five, #first > .one > #second .two > #deux #six {
16
+ #first > .one > #second .two > #deux #fourth,
17
+ #first > .one > #second .two > #deux #five,
18
+ #first > .one > #second .two > #deux #six {
17
19
  color: #110000;
18
20
  }
19
21
  #first > .one > #second .two > #deux #fourth .seven,
@@ -24,6 +26,8 @@
24
26
  #first > .one > #second .two > #deux #six .eight > #nine {
25
27
  border: 1px solid black;
26
28
  }
27
- #first > .one > #second .two > #deux #fourth #ten, #first > .one > #second .two > #deux #five #ten, #first > .one > #second .two > #deux #six #ten {
29
+ #first > .one > #second .two > #deux #fourth #ten,
30
+ #first > .one > #second .two > #deux #five #ten,
31
+ #first > .one > #second .two > #deux #six #ten {
28
32
  color: red;
29
33
  }
@@ -2,14 +2,14 @@
2
2
  color: #998899;
3
3
  }
4
4
  .scope1 {
5
- color: blue;
6
- border-color: black;
5
+ color: #0000ff;
6
+ border-color: #000000;
7
7
  }
8
8
  .scope1 .scope2 {
9
- color: blue;
9
+ color: #0000ff;
10
10
  }
11
11
  .scope1 .scope2 .scope3 {
12
- color: red;
13
- border-color: black;
14
- background-color: white;
12
+ color: #ff0000;
13
+ border-color: #000000;
14
+ background-color: #ffffff;
15
15
  }
@@ -27,6 +27,43 @@ td {
27
27
  margin: 0;
28
28
  padding: 0;
29
29
  }
30
- td, input {
30
+ td,
31
+ input {
31
32
  line-height: 1em;
32
33
  }
34
+ a {
35
+ color: red;
36
+ }
37
+ a:hover {
38
+ color: blue;
39
+ }
40
+ div a {
41
+ color: green;
42
+ }
43
+ p a span {
44
+ color: yellow;
45
+ }
46
+ .foo .bar .qux,
47
+ .foo .baz .qux {
48
+ display: block;
49
+ }
50
+ .qux .foo .bar,
51
+ .qux .foo .baz {
52
+ display: inline;
53
+ }
54
+ .qux .foo .bar .biz,
55
+ .qux .foo .baz .biz {
56
+ display: none;
57
+ }
58
+ .other ::fnord {
59
+ color: #ff0000;
60
+ }
61
+ .other::fnord {
62
+ color: #ff0000;
63
+ }
64
+ .other ::bnord {
65
+ color: #ff0000;
66
+ }
67
+ .other::bnord {
68
+ color: #ff0000;
69
+ }
@@ -4,6 +4,8 @@
4
4
  content: "#*%:&^,)!.(~*})";
5
5
  empty: "";
6
6
  brackets: "{" "}";
7
+ escapes: "\"hello\" \\world";
8
+ escapes2: "\"llo";
7
9
  }
8
10
  #comments {
9
11
  content: "/* hello */ // not-so-secret";
@@ -31,8 +33,8 @@
31
33
  url5: "http://lesscss.org/54.4";
32
34
  }
33
35
  .mix-mul-class {
34
- color: blue;
35
- color: red;
36
- color: blue;
37
- color: orange;
36
+ color: #0000ff;
37
+ color: #ff0000;
38
+ color: #0000ff;
39
+ color: #ffa500;
38
40
  }
@@ -22,3 +22,6 @@
22
22
  .alpha {
23
23
  filter: alpha(opacity=42);
24
24
  }
25
+ a:nth-child(2) {
26
+ border: 1px;
27
+ }
@@ -13,18 +13,20 @@
13
13
  .whitespace {
14
14
  color: white ;
15
15
  }
16
- .white, .space, .mania {
16
+ .white,
17
+ .space,
18
+ .mania {
17
19
  color: white;
18
20
  }
19
21
  .no-semi-column {
20
- color: white;
22
+ color: #ffffff;
21
23
  }
22
24
  .no-semi-column {
23
25
  color: white;
24
26
  white-space: pre;
25
27
  }
26
28
  .no-semi-column {
27
- border: 2px solid white;
29
+ border: 2px solid #ffffff;
28
30
  }
29
31
  .newlines {
30
32
  background: the,
@@ -8,6 +8,9 @@
8
8
  #rgba {
9
9
  color: rgba(255, 238, 170, 0.1);
10
10
  }
11
+ #argb {
12
+ color: argb(rgba(255, 238, 170, 0.1));
13
+ }
11
14
  }
12
15
 
13
16
  #blue {
@@ -20,6 +23,9 @@
20
23
  #rgba {
21
24
  color: rgba(0, 0, 255, 0.1);
22
25
  }
26
+ #argb {
27
+ color: argb(rgba(0, 0, 255, 0.1));
28
+ }
23
29
  }
24
30
 
25
31
  #alpha #hsla {
@@ -44,3 +50,16 @@
44
50
  #00ff00 {
45
51
  color: hsl(120, 100%, 50%);
46
52
  }
53
+
54
+ .lightenblue {
55
+ color: lighten(blue, 10%);
56
+ }
57
+
58
+ .darkenblue {
59
+ color: darken(blue, 10%);
60
+ }
61
+
62
+ .unknowncolors {
63
+ color: blue2;
64
+ border: 2px solid superred;
65
+ }
@@ -10,9 +10,9 @@
10
10
 
11
11
  */
12
12
 
13
- /*
13
+ /*
14
14
  * Comment Test
15
- *
15
+ *
16
16
  * - cloudhead (http://cloudhead.net)
17
17
  *
18
18
  */
@@ -35,15 +35,15 @@
35
35
  /* @group Variables
36
36
  ------------------- */
37
37
  #comments /* boo */ {
38
- /**/ // An empty comment
38
+ /**/ // An empty comment
39
39
  color: red; /* A C-style comment */
40
40
  background-color: orange; // A little comment
41
41
  font-size: 12px;
42
-
42
+
43
43
  /* lost comment */ content: @var;
44
-
44
+
45
45
  border: 1px solid black;
46
-
46
+
47
47
  // padding & margin //
48
48
  padding: 0; // }{ '"
49
49
  margin: 2em;
@@ -57,6 +57,8 @@
57
57
 
58
58
  .selector /* .with */, .lots, /* of */ .comments {
59
59
  color: grey, /* blue */ orange;
60
+ -webkit-border-radius: 2px /* webkit only */;
61
+ -moz-border-radius: 2px * 4 /* moz only with operation */;
60
62
  }
61
63
 
62
64
  #last { color: blue }
@@ -53,3 +53,13 @@ form[data-disabled] {
53
53
  p::before {
54
54
  color: black;
55
55
  }
56
+
57
+ #issue322 {
58
+ -webkit-animation: anim2 7s infinite ease-in-out;
59
+ }
60
+
61
+ @-webkit-keyframes frames {
62
+ 0% { border: 1px }
63
+ 5.5% { border: 2px }
64
+ 100% { border: 3px }
65
+ }
@@ -94,3 +94,7 @@ p + h1 {
94
94
  kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
95
95
  background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
96
96
  }
97
+
98
+ #svg-data-uri {
99
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
100
+ }
@@ -1,6 +1,6 @@
1
1
  #functions {
2
2
  @var: 10;
3
- color: color("evil red"); // #660000
3
+ color: _color("evil red"); // #660000
4
4
  width: increment(15);
5
5
  height: undefined("self");
6
6
  border-width: add(2, 3);
@@ -28,6 +28,20 @@
28
28
  lightness: lightness(hsl(98, 12%, 95%));
29
29
  rounded: round(@r/3);
30
30
  roundedpx: round(10px / 3);
31
+ percentage: percentage(10px / 50);
32
+ color: color("#ff0011");
33
+
34
+ .is-a {
35
+ color: iscolor(#ddd);
36
+ color: iscolor(red);
37
+ color: iscolor(rgb(0, 0, 0));
38
+ keyword: iskeyword(hello);
39
+ number: isnumber(32);
40
+ string: isstring("hello");
41
+ pixel: ispixel(32px);
42
+ percent: ispercentage(32%);
43
+ em: isem(32em);
44
+ }
31
45
  }
32
46
 
33
47
  #alpha {
@@ -0,0 +1,8 @@
1
+ @fat: 0;
2
+ @cloudhead: "#000000";
3
+
4
+ .nav {
5
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 20);
6
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@fat);
7
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr=@cloudhead, GradientType=@fat);
8
+ }
@@ -0,0 +1,2 @@
1
+
2
+ body { width: 100% }
@@ -1,8 +1,11 @@
1
1
  @import url("import/import-test-a.less");
2
- //@import url("import/import-test-a.less");
2
+ @import url(http://fonts.googleapis.com/css?family=Open+Sans);
3
+
4
+ @import url(something.css) screen and (color) and (max-width: 600px);
3
5
 
4
6
  #import-test {
5
7
  .mixin;
6
8
  width: 10px;
7
9
  height: @a + 10%;
8
10
  }
11
+ @import "import/import-test-e" screen and (max-width: 600px);
@@ -5,7 +5,7 @@
5
5
 
6
6
  @media print {
7
7
  .class {
8
- color: blue;
8
+ color: blue;
9
9
  .sub {
10
10
  width: @var;
11
11
  }
@@ -23,3 +23,57 @@
23
23
  @media all and (orientation:portrait) {
24
24
  aside { float: none; }
25
25
  }
26
+
27
+ @media handheld and (min-width: @var), screen and (min-width: 20em) {
28
+ body {
29
+ max-width: 480px;
30
+ }
31
+ }
32
+
33
+ body {
34
+ @media print {
35
+ padding: 20px;
36
+
37
+ header {
38
+ background-color: red;
39
+ }
40
+
41
+ @media (orientation:landscape) {
42
+ margin-left: 20px;
43
+ }
44
+ }
45
+ }
46
+
47
+ body {
48
+ @media a, b and c {
49
+ width: 95%;
50
+
51
+ @media x, y {
52
+ width: 100%;
53
+ }
54
+ }
55
+ }
56
+
57
+ .mediaMixin(@fallback: 200px) {
58
+ background: black;
59
+
60
+ @media handheld {
61
+ background: white;
62
+
63
+ @media (max-width: @fallback) {
64
+ background: red;
65
+ }
66
+ }
67
+ }
68
+
69
+ .a {
70
+ .mediaMixin(100px);
71
+ }
72
+
73
+ .b {
74
+ .mediaMixin();
75
+ }
76
+ @smartphone: ~"only screen and (max-width: 200px)";
77
+ @media @smartphone {
78
+ width: 480px;
79
+ }
@@ -106,8 +106,9 @@ body {
106
106
  #id-mixin;
107
107
  }
108
108
 
109
- .mixin-arguments (@width: 0px) {
109
+ .mixin-arguments (@width: 0px, ...) {
110
110
  border: @arguments;
111
+ width: @width;
111
112
  }
112
113
 
113
114
  .arguments {
@@ -116,3 +117,21 @@ body {
116
117
  .arguments2 {
117
118
  .mixin-arguments();
118
119
  }
120
+ .arguments3 {
121
+ .mixin-arguments;
122
+ }
123
+
124
+ .mixin-arguments2 (@width, @rest...) {
125
+ border: @arguments;
126
+ rest: @rest;
127
+ width: @width;
128
+ }
129
+ .arguments4 {
130
+ .mixin-arguments2(0, 1, 2, 3, 4);
131
+ }
132
+
133
+ // Edge cases
134
+
135
+ .edge-case {
136
+ .mixin-arguments("{");
137
+ }
@@ -0,0 +1,94 @@
1
+
2
+ // Stacking, functions..
3
+
4
+ .light (@a) when (lightness(@a) > 50%) {
5
+ color: white;
6
+ }
7
+ .light (@a) when (lightness(@a) < 50%) {
8
+ color: black;
9
+ }
10
+ .light (@a) {
11
+ margin: 1px;
12
+ }
13
+
14
+ .light1 { .light(#ddd) }
15
+ .light2 { .light(#444) }
16
+
17
+ // Arguments against each other
18
+
19
+ .max (@a, @b) when (@a > @b) {
20
+ width: @a;
21
+ }
22
+ .max (@a, @b) when (@a < @b) {
23
+ width: @b;
24
+ }
25
+
26
+ .max1 { .max(3, 6) }
27
+ .max2 { .max(8, 1) }
28
+
29
+ // Globals inside guards
30
+
31
+ @g: auto;
32
+
33
+ .glob (@a) when (@a = @g) {
34
+ margin: @a @g;
35
+ }
36
+ .glob1 { .glob(auto) }
37
+
38
+ // Other operators
39
+
40
+ .ops (@a) when (@a >= 0) {
41
+ height: gt-or-eq;
42
+ }
43
+ .ops (@a) when (@a =< 0) {
44
+ height: lt-or-eq;
45
+ }
46
+ .ops (@a) when not(@a = 0) {
47
+ height: not-eq;
48
+ }
49
+ .ops1 { .ops(0) }
50
+ .ops2 { .ops(1) }
51
+ .ops3 { .ops(-1) }
52
+
53
+ // Scope and default values
54
+
55
+ @a: auto;
56
+
57
+ .default (@a: inherit) when (@a = inherit) {
58
+ content: default;
59
+ }
60
+ .default1 { .default }
61
+
62
+ // true & false keywords
63
+ .test (@a) when (@a) {
64
+ content: "true.";
65
+ }
66
+ .test (@a) when not (@a) {
67
+ content: "false.";
68
+ }
69
+
70
+ .test1 { .test(true) }
71
+ .test2 { .test(false) }
72
+ .test3 { .test(1) }
73
+ .test4 { .test(boo) }
74
+ .test5 { .test("true") }
75
+
76
+ // Boolean expressions
77
+
78
+ .bool () when (true) and (false) { content: true and false } // FALSE
79
+ .bool () when (true) and (true) { content: true and true } // TRUE
80
+ .bool () when (true) { content: true } // TRUE
81
+ .bool () when (false) and (false) { content: true } // FALSE
82
+ .bool () when (false), (true) { content: false, true } // TRUE
83
+ .bool () when (false) and (true) and (true), (true) { content: false and true and true, true } // TRUE
84
+ .bool () when (true) and (true) and (false), (false) { content: true and true and false, false } // FALSE
85
+ .bool () when (false), (true) and (true) { content: false, true and true } // TRUE
86
+ .bool () when (false), (false), (true) { content: false, false, true } // TRUE
87
+ .bool () when (false), (false) and (true), (false) { content: false, false and true, false } // FALSE
88
+ .bool () when (false), (true) and (true) and (true), (false) { content: false, true and true and true, false } // TRUE
89
+ .bool () when not (false) { content: not false }
90
+ .bool () when not (true) and not (false) { content: not true and not false }
91
+ .bool () when not (true) and not (true) { content: not true and not true }
92
+ .bool () when not (false) and (false), not (false) { content: not false and false, not false }
93
+
94
+ .bool1 { .bool }
@@ -0,0 +1,18 @@
1
+
2
+ .mixin (9) {
3
+ border: 9 !important;
4
+ }
5
+ .mixin (@a: 0) {
6
+ border: @a;
7
+ boxer: @a;
8
+ }
9
+
10
+ .class {
11
+ .mixin(1);
12
+ .mixin(2) !important;
13
+ .mixin(3);
14
+ .mixin(4) !important;
15
+ .mixin(5);
16
+ .mixin !important;
17
+ .mixin(9);
18
+ }
@@ -1,3 +1,6 @@
1
+ .mixin (...) {
2
+ variadic: true;
3
+ }
1
4
  .mixin () {
2
5
  zero: 0;
3
6
  }
@@ -45,3 +45,23 @@
45
45
  .direct {
46
46
  #namespace > .borders;
47
47
  }
48
+
49
+ .bo, .bar {
50
+ width: 100%;
51
+ }
52
+ .bo {
53
+ border: 1px;
54
+ }
55
+ .ar.bo.ca {
56
+ color: black;
57
+ }
58
+ .jo.ki {
59
+ background: none;
60
+ }
61
+ .extended {
62
+ .bo;
63
+ .jo.ki;
64
+ }
65
+ .foo .bar {
66
+ .bar;
67
+ }
@@ -36,6 +36,10 @@
36
36
  padding: -1px 2px 0 -4px; //
37
37
  }
38
38
 
39
+ .rem-dimensions {
40
+ font-size: 20rem / 5 + 1.5rem; // 5.5rem
41
+ }
42
+
39
43
  .colors {
40
44
  color: #123; // #112233
41
45
  border-color: #234 + #111111; // #334455
@@ -22,3 +22,34 @@ td {
22
22
  td, input {
23
23
  line-height: 1em;
24
24
  }
25
+
26
+ a {
27
+ color: red;
28
+
29
+ &:hover { color: blue; }
30
+
31
+ div & { color: green; }
32
+
33
+ p & span { color: yellow; }
34
+ }
35
+
36
+ .foo {
37
+ .bar, .baz {
38
+ & .qux {
39
+ display: block;
40
+ }
41
+ .qux & {
42
+ display: inline;
43
+ }
44
+ .qux & .biz {
45
+ display: none;
46
+ }
47
+ }
48
+ }
49
+
50
+ .other ::fnord { color: red }
51
+ .other::fnord { color: red }
52
+ .other {
53
+ ::bnord {color: red }
54
+ &::bnord {color: red }
55
+ }
@@ -4,6 +4,8 @@
4
4
  content: "#*%:&^,)!.(~*})";
5
5
  empty: "";
6
6
  brackets: "{" "}";
7
+ escapes: "\"hello\" \\world";
8
+ escapes2: "\"llo";
7
9
  }
8
10
  #comments {
9
11
  content: "/* hello */ // not-so-secret";
@@ -48,3 +48,7 @@
48
48
  @var: 42;
49
49
  filter: alpha(opacity=@var);
50
50
  }
51
+
52
+ a:nth-child(@a) {
53
+ border: 1px;
54
+ }