Blame view

node_modules/less/test/less-bom/namespacing/namespacing-1.less 584 Bytes
ce4c83ff   wxy   初始提交
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
  @varToGet: default-color;
  .foo {
    color1: @defaults[@default-color];
    color2: @defaults[@nested][@color];
    color3: @theme[color];
    color4: @theme[@nested][color];
    color5: @defaults[@@varToGet];
    prop: #ns1[foo];
    var: #ns1[@foo];
    sub: #ns1.vars[$sub];
  }
  
  @defaults: {
    @default-color: red;
    @nested: {
      @color: yellow;
    }
  };
  
  @theme: {
    color: red;
    @nested: {
      color: yellow;
    }
  };
  
  #ns1 {
    foo: bar;
    @foo: baz;
    .vars() {
      sub: value;
    }
  }
  
  // Test that it matches more than one mixin
  #ns1 {
    foo: uno;
    @foo: dos;
    .vars() {
      sub: tres;
    }
  }