forked from ColorlibHQ/AdminLTE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixins.less
executable file
·166 lines (150 loc) · 5.48 KB
/
mixins.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
// Misc: mixins
//==============
//Changes the color and the hovering properties of the navbar
.navbar-variant(@color; @font-color: rgba(255, 255, 255, 0.8); @hover-color: #f6f6f6; @hover-bg: rgba(0, 0, 0, 0.1)) {
background-color: @color;
//Navbar links
.nav a {
color: @font-color;
}
.nav > li > a:hover,
.nav > li > a:active,
.nav > li > a:focus,
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
background: @hover-bg;
color: @hover-color;
}
.navbar-right > .nav {
margin-right: 10px;
}
//Add color to the sidebar toggle button
.sidebar-toggle .icon-bar {
background: @font-color;
}
.sidebar-toggle:hover .icon-bar {
background: @hover-color!important;
}
}
//Logo color variation
.logo-variant(@color) {
background-color: @color;
color: #f9f9f9;
> a {
color: #f9f9f9;
}
&:hover {
background: darken(@color, 1%);
}
}
//Box solid color variantion creator
.box-solid-variant(@color) {
> .box-header {
color: #fff;
background: @color;
background-color: @color;
a {
color: #444;
}
}
}
//Transform function that rotates eements
.transform(@degree) {
transform:rotate(@degree);
-ms-transform:rotate(@degree); /* IE 9 */
-webkit-transform:rotate(@degree); /* Safari and Chrome */
}
//For floating elements
.clearfix() {
&:before,
&:after {
display: table;
content: " ";
}
&:after {
clear: both;
}
}
//border radius creator
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
//Different radius each side
.border-radius(@top-left; @top-right; @bottom-left; @bottom-right) {
-webkit-border-top-left-radius: @top-left;
-webkit-border-top-right-radius: @top-right;
-webkit-border-bottom-right-radius: @bottom-right;
-webkit-border-bottom-left-radius: @bottom-left;
-moz-border-radius-topleft: @top-left;
-moz-border-radius-topright: @top-right;
-moz-border-radius-bottomright: @bottom-right;
-moz-border-radius-bottomleft: @bottom-left;
border-top-left-radius: @top-left;
border-top-right-radius: @top-right;
border-bottom-right-radius: @bottom-right;
border-bottom-left-radius: @bottom-left;
}
//Bootstrap mixins for progress bars. You can find original copies
//with the bootstrap assets (www.getbootstrap.com)
.progress-bar-variant(@color) {
background-color: @color;
.progress-striped & {
#gradient > .striped();
}
}
// Animations
.animation(@animation) {
-webkit-animation: @animation;
animation: @animation;
}
#gradient {
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, @color), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, @color), color-stop(.75, @color), color-stop(.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
}
}
/*---------------------------------------------------
LESS Elements 0.9
---------------------------------------------------
A set of useful LESS mixins
More info at: http://lesselements.com
---------------------------------------------------*/
.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
background: @color;
background: -webkit-gradient(linear,
left bottom,
left top,
color-stop(0, @start),
color-stop(1, @stop));
background: -ms-linear-gradient(bottom,
@start,
@stop);
background: -moz-linear-gradient(center bottom,
@start 0%,
@stop 100%);
background: -o-linear-gradient(@stop,
@start);
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
}
.bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
background: @color;
background: -webkit-gradient(linear,
left bottom,
left top,
color-stop(0, rgb(@start,@start,@start)),
color-stop(1, rgb(@stop,@stop,@stop)));
background: -ms-linear-gradient(bottom,
rgb(@start,@start,@start) 0%,
rgb(@stop,@stop,@stop) 100%);
background: -moz-linear-gradient(center bottom,
rgb(@start,@start,@start) 0%,
rgb(@stop,@stop,@stop) 100%);
background: -o-linear-gradient(rgb(@stop,@stop,@stop),
rgb(@start,@start,@start));
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",rgb(@stop,@stop,@stop),rgb(@start,@start,@start)));
}