]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | @if $slider-imageless {\r |
2 | .#{$prefix}slider:before {\r | |
3 | @if $slider-track-border-width != null and $slider-track-border-width != 0 {\r | |
4 | border: $slider-track-border-width $slider-track-border-style $slider-track-border-color;\r | |
5 | }\r | |
6 | content: '';\r | |
7 | position: absolute;\r | |
8 | @if $slider-track-border-radius != 0 {\r | |
9 | border-radius: $slider-track-border-radius;\r | |
10 | }\r | |
11 | background-color: $slider-track-background-color;\r | |
12 | \r | |
13 | // pseudo elements don't inheit box sizing via the global * rule\r | |
14 | box-sizing:border-box;\r | |
15 | -moz-box-sizing:border-box;\r | |
16 | -ms-box-sizing:border-box;\r | |
17 | -webkit-box-sizing:border-box;\r | |
18 | }\r | |
19 | \r | |
20 | .#{$prefix}slider-thumb {\r | |
21 | background-color: $slider-thumb-background-color;\r | |
22 | @if $slider-thumb-border-width != null and $slider-thumb-border-width != 0 {\r | |
23 | border: $slider-thumb-border-width $slider-thumb-border-style $slider-thumb-border-color;\r | |
24 | }\r | |
25 | @if $slider-thumb-border-radius != 0 {\r | |
26 | border-radius: $slider-thumb-border-radius;\r | |
27 | }\r | |
28 | &:before {\r | |
29 | color: $slider-thumb-glyph-color;\r | |
30 | }\r | |
31 | }\r | |
32 | \r | |
33 | .#{$prefix}slider-thumb-over {\r | |
34 | background-color: $slider-thumb-background-color-over;\r | |
35 | border-color: $slider-thumb-border-color-over;\r | |
36 | &:before {\r | |
37 | color: $slider-thumb-glyph-color-over;\r | |
38 | }\r | |
39 | }\r | |
40 | \r | |
41 | .#{$prefix}slider-focus .#{$prefix}slider-thumb {\r | |
42 | background-color: $slider-thumb-background-color-focus;\r | |
43 | border-color: $slider-thumb-border-color-focus;\r | |
44 | &:before {\r | |
45 | color: $slider-thumb-glyph-color-focus;\r | |
46 | }\r | |
47 | }\r | |
48 | \r | |
49 | .#{$prefix}slider-focus .#{$prefix}slider-thumb-over {\r | |
50 | background-color: $slider-thumb-background-color-over;\r | |
51 | }\r | |
52 | \r | |
53 | .#{$prefix}slider-thumb-drag {\r | |
54 | background-color: $slider-thumb-background-color-drag;\r | |
55 | border-color: $slider-thumb-border-color-drag;\r | |
56 | &:before {\r | |
57 | color: $slider-thumb-glyph-color-drag;\r | |
58 | }\r | |
59 | }\r | |
60 | \r | |
61 | .#{$prefix}slider-focus .#{$prefix}slider-thumb-drag {\r | |
62 | background-color: $slider-thumb-background-color-drag;\r | |
63 | }\r | |
64 | }\r | |
65 | \r | |
66 | /* Horizontal styles */\r | |
67 | \r | |
68 | // private\r | |
69 | $slider-vert-margin: ($form-field-height - $horizontal-slider-thumb-height) / 2;\r | |
70 | $slider-top-margin: ceil($slider-vert-margin);\r | |
71 | $slider-bottom-margin: floor($slider-vert-margin);\r | |
72 | \r | |
73 | .#{$prefix}slider-horz {\r | |
74 | padding-left: $horizontal-slider-start-cap-width;\r | |
75 | background: no-repeat 0 (-$horizontal-slider-thumb-height);\r | |
76 | \r | |
77 | // make sure the slider is vertically centered in form-field space\r | |
78 | margin: $slider-top-margin 0 $slider-bottom-margin;\r | |
79 | \r | |
80 | .#{$prefix}slider-end {\r | |
81 | padding-right: $horizontal-slider-end-cap-width;\r | |
82 | background: no-repeat right (-$horizontal-slider-thumb-height * 2);\r | |
83 | }\r | |
84 | \r | |
85 | .#{$prefix}slider-inner {\r | |
86 | height: $horizontal-slider-thumb-height;\r | |
87 | }\r | |
88 | \r | |
89 | @if $slider-imageless {\r | |
90 | &:before {\r | |
91 | height: $slider-track-size;\r | |
92 | width: 100%;\r | |
93 | top: 50%;\r | |
94 | left: 0;\r | |
95 | margin-top: -($slider-track-size / 2);\r | |
96 | }\r | |
97 | }\r | |
98 | }\r | |
99 | \r | |
100 | .#{$prefix}slider-horz .#{$prefix}slider-thumb {\r | |
101 | width: $horizontal-slider-thumb-width;\r | |
102 | height: $horizontal-slider-thumb-height;\r | |
103 | margin-left: -$horizontal-slider-start-cap-width;\r | |
104 | @if not $slider-imageless {\r | |
105 | background-image: theme-background-image('slider/slider-thumb', 'png');\r | |
106 | }\r | |
107 | \r | |
108 | @if $enable-font-icons and ($horizontal-slider-thumb-glyph != null) {\r | |
109 | @include font-icon($horizontal-slider-thumb-glyph);\r | |
110 | }\r | |
111 | }\r | |
112 | \r | |
113 | @if not $slider-imageless {\r | |
114 | .#{$prefix}slider-horz.#{$prefix}slider-focus .#{$prefix}slider-thumb {\r | |
115 | background-position: (-$horizontal-slider-thumb-width * 3) (-$horizontal-slider-thumb-height * 3);\r | |
116 | }\r | |
117 | \r | |
118 | .#{$prefix}slider-horz .#{$prefix}slider-thumb-over {\r | |
119 | background-position: (-$horizontal-slider-thumb-width) (-$horizontal-slider-thumb-height);\r | |
120 | }\r | |
121 | \r | |
122 | .#{$prefix}slider-horz.#{$prefix}slider-focus .#{$prefix}slider-thumb-over {\r | |
123 | background-position: (-$horizontal-slider-thumb-width * 4) (-$horizontal-slider-thumb-height * 4);\r | |
124 | }\r | |
125 | \r | |
126 | .#{$prefix}slider-horz .#{$prefix}slider-thumb-drag {\r | |
127 | background-position: (-$horizontal-slider-thumb-width * 2) (-$horizontal-slider-thumb-height * 2);\r | |
128 | }\r | |
129 | \r | |
130 | .#{$prefix}slider-horz.#{$prefix}slider-focus .#{$prefix}slider-thumb-drag {\r | |
131 | background-position: (-$horizontal-slider-thumb-width * 5) (-$horizontal-slider-thumb-height * 5);\r | |
132 | }\r | |
133 | }\r | |
134 | \r | |
135 | @if $include-rtl {\r | |
136 | .#{$prefix}rtl.#{$prefix}slider-horz {\r | |
137 | padding-left: 0;\r | |
138 | padding-right: $horizontal-slider-start-cap-width;\r | |
139 | @if not $slider-imageless {\r | |
140 | background-position: right (-$horizontal-slider-thumb-height * 2);\r | |
141 | }\r | |
142 | \r | |
143 | .#{$prefix}slider-end {\r | |
144 | padding-right: 0;\r | |
145 | padding-left: $horizontal-slider-end-cap-width;\r | |
146 | @if not $slider-imageless {\r | |
147 | background-position: left (-$horizontal-slider-thumb-height);\r | |
148 | }\r | |
149 | }\r | |
150 | \r | |
151 | .#{$prefix}slider-thumb {\r | |
152 | margin-right: -$horizontal-slider-end-cap-width;\r | |
153 | }\r | |
154 | }\r | |
155 | }\r | |
156 | \r | |
157 | /* Vertical styles */\r | |
158 | .#{$prefix}slider-ct-vert {\r | |
159 | height: 100%;\r | |
160 | }\r | |
161 | \r | |
162 | .#{$prefix}slider-vert {\r | |
163 | padding-top: $vertical-slider-start-cap-height;\r | |
164 | @if not $slider-imageless {\r | |
165 | background: no-repeat (-$vertical-slider-thumb-width * 2) 0;\r | |
166 | }\r | |
167 | height: 100%;\r | |
168 | \r | |
169 | > .#{$prefix}slider-end {\r | |
170 | height: 100%;\r | |
171 | > .#{$prefix}slider-inner {\r | |
172 | height: 100%;\r | |
173 | }\r | |
174 | }\r | |
175 | \r | |
176 | @if $slider-imageless {\r | |
177 | &:before {\r | |
178 | width: $slider-track-size;\r | |
179 | height: 100%;\r | |
180 | left: $vertical-slider-thumb-width / 2;\r | |
181 | top: 0;\r | |
182 | margin-left: -($slider-track-size / 2);\r | |
183 | }\r | |
184 | }\r | |
185 | }\r | |
186 | \r | |
187 | .#{$prefix}slider-vert .#{$prefix}slider-end {\r | |
188 | padding-bottom: $vertical-slider-end-cap-height;\r | |
189 | background: no-repeat (-$vertical-slider-thumb-width) bottom;\r | |
190 | width: $vertical-slider-thumb-width;\r | |
191 | }\r | |
192 | \r | |
193 | .#{$prefix}slider-vert .#{$prefix}slider-inner {\r | |
194 | width: $vertical-slider-thumb-width;\r | |
195 | }\r | |
196 | \r | |
197 | .#{$prefix}slider-vert .#{$prefix}slider-thumb {\r | |
198 | width: $vertical-slider-thumb-width;\r | |
199 | height: $vertical-slider-thumb-height;\r | |
200 | margin-bottom: -$vertical-slider-end-cap-height;\r | |
201 | @if not $slider-imageless {\r | |
202 | background-image: theme-background-image('slider/slider-v-thumb', 'png');\r | |
203 | }\r | |
204 | \r | |
205 | @if $enable-font-icons and ($vertical-slider-thumb-glyph != null) {\r | |
206 | @include font-icon($vertical-slider-thumb-glyph);\r | |
207 | }\r | |
208 | }\r | |
209 | \r | |
210 | @if not $slider-imageless {\r | |
211 | .#{$prefix}slider-vert.#{$prefix}slider-focus .#{$prefix}slider-thumb {\r | |
212 | background-position: (-$vertical-slider-thumb-width * 3) (-$vertical-slider-thumb-height * 3);\r | |
213 | }\r | |
214 | \r | |
215 | .#{$prefix}slider-vert .#{$prefix}slider-thumb-over {\r | |
216 | background-position: (-$vertical-slider-thumb-width) (-$vertical-slider-thumb-height);\r | |
217 | }\r | |
218 | \r | |
219 | .#{$prefix}slider-vert.#{$prefix}slider-focus .#{$prefix}slider-thumb-over {\r | |
220 | background-position: (-$vertical-slider-thumb-width * 4) (-$vertical-slider-thumb-height * 4);\r | |
221 | }\r | |
222 | \r | |
223 | .#{$prefix}slider-vert .#{$prefix}slider-thumb-drag {\r | |
224 | background-position: (-$vertical-slider-thumb-width * 2) (-$vertical-slider-thumb-height * 2);\r | |
225 | }\r | |
226 | \r | |
227 | .#{$prefix}slider-vert.#{$prefix}slider-focus .#{$prefix}slider-thumb-drag {\r | |
228 | background-position: (-$vertical-slider-thumb-width * 5) (-$vertical-slider-thumb-height * 5);\r | |
229 | }\r | |
230 | \r | |
231 | .#{$prefix}slider-horz,\r | |
232 | .#{$prefix}slider-horz .#{$prefix}slider-end,\r | |
233 | .#{$prefix}slider-horz .#{$prefix}slider-inner {\r | |
234 | background-image: theme-background-image('slider/slider-bg', 'png');\r | |
235 | }\r | |
236 | \r | |
237 | .#{$prefix}slider-vert,\r | |
238 | .#{$prefix}slider-vert .#{$prefix}slider-end,\r | |
239 | .#{$prefix}slider-vert .#{$prefix}slider-inner {\r | |
240 | background-image: theme-background-image('slider/slider-v-bg', 'png');\r | |
241 | }\r | |
242 | }\r | |
243 | \r | |
244 | .#{$prefix}slider-default-cell > .#{$prefix}grid-cell-inner,\r | |
245 | .#{$prefix}sliderwidget-default-cell > .#{$prefix}grid-cell-inner {\r | |
246 | padding-top: max(floor(($grid-row-height - $horizontal-slider-thumb-height) / 2) - $slider-top-margin, 0);\r | |
247 | padding-bottom: max(ceil(($grid-row-height - $horizontal-slider-thumb-height) / 2) - $slider-bottom-margin, 0);\r | |
248 | }\r |