~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to src/lint/linter/__tests__/lessc/operations.lint-test

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-11-01 23:20:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20141101232006-mvlnp0cil67tsboe
Tags: upstream-0~git20141101/arcanist
Import upstream version 0~git20141101, component arcanist

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#operations {
 
2
  color: (#110000 + #000011 + #001100); // #111111
 
3
  height: (10px / 2px + 6px - 1px * 2); // 9px
 
4
  width: (2 * 4 - 5em); // 3em
 
5
  .spacing {
 
6
    height: (10px / 2px+6px-1px*2);
 
7
    width: (2  * 4-5em);
 
8
  }
 
9
  substraction: (20 - 10 - 5 - 5); // 0
 
10
  division: (20 / 5 / 4); // 1
 
11
}
 
12
 
 
13
@x: 4;
 
14
@y: 12em;
 
15
 
 
16
.with-variables {
 
17
  height: (@x + @y); // 16em
 
18
  width: (12 + @y); // 24em
 
19
  size: (5cm - @x); // 1cm
 
20
}
 
21
 
 
22
.with-functions {
 
23
  color: (rgb(200, 200, 200) / 2);
 
24
  color: (2 * hsl(0, 50%, 50%));
 
25
  color: (rgb(10, 10, 10) + hsl(0, 50%, 50%));
 
26
}
 
27
 
 
28
@z: -2;
 
29
 
 
30
.negative {
 
31
  height: (2px + @z); // 0px
 
32
  width: (2px - @z); // 4px
 
33
}
 
34
 
 
35
.shorthands {
 
36
  padding: -1px 2px 0 -4px; //
 
37
}
 
38
 
 
39
.rem-dimensions {
 
40
  font-size: (20rem / 5 + 1.5rem); // 5.5rem
 
41
}
 
42
 
 
43
.colors {
 
44
  color: #123; // #112233
 
45
  border-color: (#234 + #111111); // #334455
 
46
  background-color: (#222222 - #fff); // #000000
 
47
  .other {
 
48
    color: (2 * #111); // #222222
 
49
    border-color: (#333333 / 3 + #111); // #222222
 
50
  }
 
51
}
 
52
 
 
53
.negations {
 
54
    @var: 4px;
 
55
    variable: (-@var); // 4
 
56
    variable1: (-@var + @var); // 0
 
57
    variable2: (@var + -@var); // 0
 
58
    variable3: (@var - -@var); // 8
 
59
    variable4: (-@var - -@var); // 0
 
60
    paren: (-(@var)); // -4px
 
61
    paren2: (-(2 + 2) * -@var); // 16
 
62
}
 
63
~~~~~~~~~~