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

« back to all changes in this revision

Viewing changes to src/lint/linter/__tests__/lessc/mixins-pattern.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
.mixin (...) {
 
2
  variadic: true;
 
3
}
 
4
.mixin (@a...) {
 
5
  named-variadic: true;
 
6
}
 
7
.mixin () {
 
8
    zero: 0;
 
9
}
 
10
.mixin (@a: 1px) {
 
11
    one: 1;
 
12
}
 
13
.mixin (@a) {
 
14
    one-req: 1;
 
15
}
 
16
.mixin (@a: 1px, @b: 2px) {
 
17
    two: 2;
 
18
}
 
19
 
 
20
.mixin (@a, @b, @c) {
 
21
    three-req: 3;
 
22
}
 
23
 
 
24
.mixin (@a: 1px, @b: 2px, @c: 3px) {
 
25
    three: 3;
 
26
}
 
27
 
 
28
.zero {
 
29
    .mixin();
 
30
}
 
31
 
 
32
.one {
 
33
    .mixin(1);
 
34
}
 
35
 
 
36
.two {
 
37
    .mixin(1, 2);
 
38
}
 
39
 
 
40
.three {
 
41
    .mixin(1, 2, 3);
 
42
}
 
43
 
 
44
//
 
45
 
 
46
.mixout ('left') {
 
47
    left: 1;
 
48
}
 
49
 
 
50
.mixout ('right') {
 
51
    right: 1;
 
52
}
 
53
 
 
54
.left {
 
55
    .mixout('left');
 
56
}
 
57
.right {
 
58
    .mixout('right');
 
59
}
 
60
 
 
61
//
 
62
 
 
63
.border (@side, @width) {
 
64
    color: black;
 
65
    .border-side(@side, @width);
 
66
}
 
67
.border-side (left, @w) {
 
68
    border-left: @w;
 
69
}
 
70
.border-side (right, @w) {
 
71
    border-right: @w;
 
72
}
 
73
 
 
74
.border-right {
 
75
    .border(right, 4px);
 
76
}
 
77
.border-left {
 
78
    .border(left, 4px);
 
79
}
 
80
 
 
81
//
 
82
 
 
83
 
 
84
.border-radius (@r) {
 
85
    both: (@r * 10);
 
86
}
 
87
.border-radius (@r, left) {
 
88
    left: @r;
 
89
}
 
90
.border-radius (@r, right) {
 
91
    right: @r;
 
92
}
 
93
 
 
94
.only-right {
 
95
    .border-radius(33, right);
 
96
}
 
97
.only-left {
 
98
    .border-radius(33, left);
 
99
}
 
100
.left-right {
 
101
    .border-radius(33);
 
102
}
 
103
~~~~~~~~~~