Blame view

node_modules/less/test/less-bom/strings.less 1.44 KB
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
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
  #strings {
    background-image: url("http://son-of-a-banana.com");
    quotes: "~" "~";
    content: "#*%:&^,)!.(~*})";
    empty: "";
    brackets: "{" "}";
    escapes: "\"hello\" \\world";
    escapes2: "\"llo";
  }
  #comments {
    content: "/* hello */ // not-so-secret";
  }
  #single-quote {
    quotes: "'" "'";
    content: '""#!&""';
    empty: '';
    semi-colon: ';';
  }
  #escaped {
    filter: ~"DX.Transform.MS.BS.filter(opacity=50)";
  }
  #one-line { image: url(http://tooks.com) }
  #crazy { image: url(http://), "}", url("http://}") }
  #interpolation {
    @var: '/dev';
    url: "http://lesscss.org@{var}/image.jpg";
  
    @var2: 256;
    url2: "http://lesscss.org/image-@{var2}.jpg";
  
    @var3: #456;
    url3: "http://lesscss.org@{var3}";
  
    @var4: hello;
    url4: "http://lesscss.org/@{var4}";
  
    @var5: 54.4px;
    url5: "http://lesscss.org/@{var5}";
  }
  
  // multiple calls with string interpolation
  
  .mix-mul (@a: green) {
      color: ~"@{a}";
  }
  .mix-mul-class {
      .mix-mul(blue);
      .mix-mul(red);
      .mix-mul(black);
      .mix-mul(orange);
  }
  
  @test: Arial, Verdana, San-Serif;
  .watermark {
    @family: ~"Univers, @{test}";
    family: @family;
  }
  #iterated-interpolation {
    @box-small: 10px;
    @box-large: 100px;
  
    .mixin { // both ruleset and mixin
      width: ~"@{box-@{suffix}}";
      weird: ~"@{box}-@{suffix}}";
      width-str: "@{box-@{suffix}}";
      weird-str: "@{box}-@{suffix}}";
      @box: ~"@{box";
      @suffix: large;
    }
    .interpolation-mixin {
      .mixin(); //call the above as mixin
    }
  }