local changes from server
[redakcja.git] / apps / wiki / static--wiki--editor--node_modules--grunt-contrib-less--node_modules--less--test / less / scope.less
1 @x: red;
2 @x: blue;
3 @z: transparent;
4 @mix: none;
5
6 .mixin {
7   @mix: #989;
8 }
9 @mix: blue;
10 .tiny-scope {
11   color: @mix; // #989
12   .mixin;
13 }
14
15 .scope1 {
16   @y: orange;
17   @z: black;
18   color: @x; // blue
19   border-color: @z; // black
20   .hidden {
21     @x: #131313;
22   }
23   .scope2 {
24     @y: red;
25     color: @x; // blue
26     .scope3 {
27       @local: white;
28       color: @y; // red
29       border-color: @z; // black
30       background-color: @local; // white
31     }
32   }
33 }
34
35 #namespace {
36   .scoped_mixin() {
37     @local-will-be-made-global: green;
38     .scope {
39       scoped-val: @local-will-be-made-global;
40         }
41   }
42 }
43
44 #namespace > .scoped_mixin();
45
46 .setHeight(@h) { @height: 1024px; }
47 .useHeightInMixinCall(@h) { .useHeightInMixinCall { mixin-height: @h; } }
48 @mainHeight: 50%;
49 .setHeight(@mainHeight);
50 .heightIsSet { height: @height; }
51 .useHeightInMixinCall(@height);
52
53 .importRuleset() {
54   .imported {
55     exists: true;
56   }
57 }
58 .importRuleset();
59 .testImported {
60   .imported;
61 }
62
63 @parameterDefault: 'top level';
64 @anotherVariable: 'top level';
65 //mixin uses top-level variables
66 .mixinNoParam(@parameter: @parameterDefault) when (@parameter = 'top level') {
67   default: @parameter;
68   scope: @anotherVariable;
69   sub-scope-only: @subScopeOnly;
70 }
71
72 #allAreUsedHere {
73   //redefine top-level variables in different scope
74   @parameterDefault: 'inside';
75   @anotherVariable: 'inside';
76   @subScopeOnly: 'inside';
77   //use the mixin
78   .mixinNoParam();
79 }