This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
/
lib.less
166 lines (144 loc) · 4.16 KB
/
lib.less
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Columnar layout system.
// Adaped from Frameless by Joni Korpi <http://framelessgrid.com/>
// licensed under CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
@column: 48; // The column-width of your grid in pixels
@gutter: 24; // The gutter-width of your grid in pixels
@px: 1px; // Multiply by this to make a number in px.
.width(@cols:1) {
width: (@cols * (@column + @gutter) - @gutter) * @px;
}
.max-width(@cols:1) {
max-width: (@cols * (@column + @gutter) - @gutter) * @px;
}
//Breakpoints
@3col: 0px;
@4col: 480px;
@7col: 480px;
@10col: 768px;
// Colors
@link: #447BC4;
@faded-link: fadeOut(@link, 50%);
@shadow-blue: #98B2C9;
@border-blue: #C9DDF2;
@inset-blue: rgba(152, 178, 201, 0.3);
@border-black: fadeOut(#000, 80%);
@faded-blue: fadeOut(@border-blue, 90%);
@orange: #d60;
@red: #c00000;
@green: #090;
@black: #000;
@dark-gray: #333;
@text: @dark-gray;
@medium-gray: #666;
@gray: #888;
@note-gray: #999;
@light-gray: #ccc;
@faint-gray: #eee;
@barely-gray: #fcfcfc;
@white: #fff;
// Font Stacks
@open-stack: "Open Sans", "Helvetica Neue", Arial, sans-serif;
// Mixins
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}
.transform(@tform) {
-webkit-transform: @tform;
-moz-transform: @tform;
-ms-transform: @tform;
-o-transform: @tform;
transform: @tform;
}
.transition(@property) {
-moz-transition: @property;
-webkit-transition: @property;
transition: @property;
}
.transition-property(@property) {
-moz-transition-property: @property;
-webkit-transition-property: @property;
transition-property: @property;
}
.transition-duration(@duration:2s) {
-moz-transition-duration: @duration;
-webkit-transition-duration: @duration;
transition-duration: @duration;
}
.transition-delay(@delay:1s) {
-moz-transition-delay: @delay;
-webkit-transition-delay: @delay;
transition-delay: @delay;
}
.background-size(@size) {
-moz-background-size: @size;
-wekbkit-background-size: @size;
background-size: @size;
}
.background-size(@size, @size2) {
-moz-background-size: @size, @size2;
-wekbkit-background-size: @size, @size2;
background-size: @size, @size2;
}
.box-shadow(@shadow) {
box-shadow: @shadow;
-moz-box-shadow: @shadow;
-webkit-box-shadow: @shadow;
}
.box-shadow(@shadow, @shadow2) {
box-shadow: @shadow, @shadow2;
-moz-box-shadow: @shadow, @shadow2;
-webkit-box-shadow: @shadow, @shadow2;
}
.box-shadow(@shadow, @shadow2, @shadow3) {
box-shadow: @shadow, @shadow2, @shadow3;
-moz-box-shadow: @shadow, @shadow2, @shadow3;
-webkit-box-shadow: @shadow, @shadow2, @shadow3;
}
.text-columns(@count, @gap: 1em) {
column-count: @count;
-moz-column-count: @count;
-webkit-column-count: @count;
column-gap: @gap;
-moz-column-gap: @gap;
-webkit-column-gap: @gap;
}
.border-box() {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.ellipsis() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.gradient-two-color(@color1, @color2) {
background-color: @color2;
background-image: -webkit-gradient(linear, left bottom, left top, from(@color1), to(@color2));
background-image: linear-gradient(@color1, @color2);
background-image: -moz-linear-gradient(@color1, @color2);
background-image: -webkit-linear-gradient(@color1, @color2);
}
// Vertical sprite
.vsprite(@url, @pos, @spacing, @offset:0) {
background: ~'url(@{url}) no-repeat';
background-position: 0 (@spacing * @pos * -1 + @offset) + 0px;
}
.vsprite-pos(@pos, @spacing, @offset:0) {
background-position: 0 (@spacing * @pos * -1 + @offset) + 0px;
}
.vsprite-pos-right(@pos, @spacing, @offset:0) {
background-position: right (@spacing * @pos * -1 + @offset) + 0px;
}
// Horizontal sprite
.hsprite(@url, @pos, @spacing, @offset:0) {
background: ~'url(@{url}) no-repeat';
background-position: (@spacing * @pos * -1 + @offset) + 0px 0;
}
.hsprite-pos(@pos, @spacing, @offset:0) {
background-position: (@spacing * @pos * -1 + @offset) + 0px 0;
}