summaryrefslogtreecommitdiff
path: root/vendor/leafo/lessphp/tests/inputs/site_demos.less
blob: 08d7f1e5cea9e85056a0533ba25283fc0f9ed0d6 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// these are the demos from the lessphp homepage

default {
	@base: 24px;
	@border-color: #B2B;

	.underline { border-bottom: 1px solid green }

	#header {
	  color: black;
	  border: 1px solid @border-color + #222222;

	  .navigation {
		font-size: @base / 2;
		a {
		.underline;
		}
	  }
	  .logo {
		width: 300px;
		&:hover { text-decoration: none }
	  }
	}
}

variables {
	@a: 2;
	@x: @a * @a;
	@y: @x + 1;
	@z: @x * 2 + @y;

	@nice-blue: #5B83AD;
	@light-blue: @nice-blue + #111;

	@b: @a * 10;
	@c: #888;
	@fonts: "Trebuchet MS", Verdana, sans-serif;

	.variables {
	  width: @z + 1cm; // 14cm
	  height: @b + @x + 0px; // 24px
	  color: @c;
	  background: @light-blue;
	  font-family: @fonts;
	}
}

mixins {
	.bordered {
	  border-top: dotted 1px black;
	  border-bottom: solid 2px black;
	}
	#menu a {
	  color: #111;
	  .bordered;
	}

	.post a {
	  color: red;
	  .bordered;
	}
}

nested-rules {
	#header {
	  color: black;

	  .navigation {
		font-size: 12px;
	  }
	  .logo {
		width: 300px;
		&:hover { text-decoration: none }
	  }
	}
}

namespaces {
	#bundle {
	  .button {
		display: block;
		border: 1px solid black;
		background-color: grey;
		&:hover { background-color: white }
	  }
	}
	#header a {
	  color: orange;
	  #bundle > .button; // mixin the button class
	}
}

mixin-functions {
	@outer: 10px;
	@class(@var:22px, @car: 400px + @outer) {
	  margin: @var;
	  height: @car;
	}

	@group {
	  @f(@color) {
		color: @color;
	  }
	  .cool {
		border-bottom: 1px solid green;
	  }
	}

	.class(@width:200px) {
	  padding: @width;
	}

	body {
	  .class(2.0em);
	  @group > @f(red);
	  @class(10px, 10px + 2);
	  @group > .cool;
	}
}