doc-msp-theme 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/_includes/footer.html +16 -0
- data/_includes/header.html +55 -0
- data/_layouts/article.html +46 -0
- data/_layouts/chapter.html +39 -0
- data/_layouts/default.html +75 -0
- data/_sass/.csslintrc +20 -0
- data/_sass/.scss-lint.yml +212 -0
- data/_sass/_accessibility-seo.md +233 -0
- data/_sass/_accessibility.md +17 -0
- data/_sass/_accessibility.scss +30 -0
- data/_sass/_animation.scss +17 -0
- data/_sass/_badges.md +39 -0
- data/_sass/_badges.scss +50 -0
- data/_sass/_brandbar.scss +34 -0
- data/_sass/_brandcolor.md +92 -0
- data/_sass/_brandcolor.scss +24 -0
- data/_sass/_brandheader.scss +35 -0
- data/_sass/_brandnav.scss +224 -0
- data/_sass/_breadcrumb.md +39 -0
- data/_sass/_breadcrumb.scss +44 -0
- data/_sass/_button.md +218 -0
- data/_sass/_button.scss +146 -0
- data/_sass/_cancel.scss +13 -0
- data/_sass/_checkbox.md +55 -0
- data/_sass/_checkbox.scss +124 -0
- data/_sass/_close.scss +16 -0
- data/_sass/_collapse.scss +30 -0
- data/_sass/_content-list.md +375 -0
- data/_sass/_content-list.scss +49 -0
- data/_sass/_doc-msp-theme.md +106 -0
- data/_sass/_doc-msp-theme.scss +59 -0
- data/_sass/_expandable.md +141 -0
- data/_sass/_expandable.scss +21 -0
- data/_sass/_font-faces.md +83 -0
- data/_sass/_font-faces.scss +15 -0
- data/_sass/_footer.md +392 -0
- data/_sass/_footer.scss +147 -0
- data/_sass/_forms.md +139 -0
- data/_sass/_forms.scss +199 -0
- data/_sass/_functions.md +251 -0
- data/_sass/_functions.scss +389 -0
- data/_sass/_grid.md +449 -0
- data/_sass/_grid.scss +314 -0
- data/_sass/_header.md +1042 -0
- data/_sass/_helper.md +212 -0
- data/_sass/_helper.scss +150 -0
- data/_sass/_icons.md +153 -0
- data/_sass/_icons.scss +154 -0
- data/_sass/_images.md +21 -0
- data/_sass/_images.scss +54 -0
- data/_sass/_jsbutton.md +171 -0
- data/_sass/_media.scss +48 -0
- data/_sass/_mixins.scss +430 -0
- data/_sass/_modal.md +329 -0
- data/_sass/_modal.scss +117 -0
- data/_sass/_nav.scss +40 -0
- data/_sass/_navbar.scss +250 -0
- data/_sass/_normalize.md +7 -0
- data/_sass/_normalize.scss +423 -0
- data/_sass/_notifications.md +211 -0
- data/_sass/_notifications.scss +110 -0
- data/_sass/_pager.md +67 -0
- data/_sass/_pager.scss +138 -0
- data/_sass/_pagination.md +49 -0
- data/_sass/_pagination.scss +95 -0
- data/_sass/_qtip.md +74 -0
- data/_sass/_qtip.scss +175 -0
- data/_sass/_radio.md +53 -0
- data/_sass/_radio.scss +122 -0
- data/_sass/_scaffolding.scss +61 -0
- data/_sass/_search.md +0 -0
- data/_sass/_search.scss +90 -0
- data/_sass/_select.md +55 -0
- data/_sass/_select.scss +146 -0
- data/_sass/_tables.md +405 -0
- data/_sass/_tables.scss +131 -0
- data/_sass/_totop.md +126 -0
- data/_sass/_totop.scss +33 -0
- data/_sass/_type.md +817 -0
- data/_sass/_type.scss +450 -0
- data/_sass/_variables.scss +480 -0
- data/_sass/themes/bevel-theme/theme.scss +13 -0
- data/_sass/themes/dark-theme/_badges.scss +37 -0
- data/_sass/themes/dark-theme/_brandnav.scss +30 -0
- data/_sass/themes/dark-theme/_breadcrumb.scss +17 -0
- data/_sass/themes/dark-theme/_button.scss +86 -0
- data/_sass/themes/dark-theme/_checkbox.scss +9 -0
- data/_sass/themes/dark-theme/_content-list.scss +40 -0
- data/_sass/themes/dark-theme/_forms.scss +107 -0
- data/_sass/themes/dark-theme/_images.scss +30 -0
- data/_sass/themes/dark-theme/_mixins.scss +67 -0
- data/_sass/themes/dark-theme/_modal.scss +9 -0
- data/_sass/themes/dark-theme/_navbar.scss +15 -0
- data/_sass/themes/dark-theme/_notifications.scss +94 -0
- data/_sass/themes/dark-theme/_pager.scss +46 -0
- data/_sass/themes/dark-theme/_pagination.scss +81 -0
- data/_sass/themes/dark-theme/_qtip.scss +8 -0
- data/_sass/themes/dark-theme/_radio.scss +9 -0
- data/_sass/themes/dark-theme/_scaffolding.scss +29 -0
- data/_sass/themes/dark-theme/_select.scss +93 -0
- data/_sass/themes/dark-theme/_tables.scss +57 -0
- data/_sass/themes/dark-theme/_type.scss +70 -0
- data/_sass/themes/dark-theme/_variables.scss +171 -0
- data/_sass/themes/dark-theme/theme.scss +36 -0
- data/_sass/themes/debug-theme/theme.scss +415 -0
- metadata +179 -0
data/_sass/_mixins.scss
ADDED
@@ -0,0 +1,430 @@
|
|
1
|
+
// Clearfix
|
2
|
+
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
3
|
+
//
|
4
|
+
// For modern browsers
|
5
|
+
// 1. The space content is one way to avoid an Opera bug when the
|
6
|
+
// contenteditable attribute is included anywhere else in the document.
|
7
|
+
// Otherwise it causes space to appear at the top and bottom of elements
|
8
|
+
// that are clearfixed.
|
9
|
+
// 2. The use of `table` rather than `block` is only necessary if using
|
10
|
+
// `:before` to contain the top-margins of child elements.
|
11
|
+
@mixin clearfix {
|
12
|
+
&:before,
|
13
|
+
&:after {
|
14
|
+
content: ' '; // 1
|
15
|
+
display: table; // 2
|
16
|
+
}
|
17
|
+
|
18
|
+
&:after {
|
19
|
+
clear: both;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin vendor-prefix($name, $argument) {
|
24
|
+
-webkit-#{$name}: #{$argument};
|
25
|
+
-ms-#{$name}: #{$argument};
|
26
|
+
-moz-#{$name}: #{$argument};
|
27
|
+
-o-#{$name}: #{$argument};
|
28
|
+
#{$name}: #{$argument};
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin margin-top-bu ($bu, $font-size: $font-size-regular, $line-height: $line-height-ratio) {
|
32
|
+
margin-top: capline-bu($bu, $font-size, $line-height);
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin margin-bottom-bu ($bu, $font-size: $font-size-regular, $line-height: $line-height-ratio) {
|
36
|
+
margin-bottom: baseline-bu($bu, $font-size, $line-height);
|
37
|
+
}
|
38
|
+
|
39
|
+
@mixin padding-top-bu ($bu, $font-size: $font-size-regular, $line-height: $line-height-ratio) {
|
40
|
+
padding-top: capline-bu($bu, $font-size, $line-height);
|
41
|
+
}
|
42
|
+
|
43
|
+
@mixin padding-bottom-bu ($bu, $font-size: $font-size-regular, $line-height: $line-height-ratio) {
|
44
|
+
padding-bottom: baseline-bu($bu, $font-size, $line-height);
|
45
|
+
}
|
46
|
+
|
47
|
+
@mixin box-shadow($shadow) {
|
48
|
+
-webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
|
49
|
+
box-shadow: $shadow;
|
50
|
+
}
|
51
|
+
|
52
|
+
@mixin font-face($font-family, $svg-font-id, $filepath, $weight: normal, $style: normal) {
|
53
|
+
@font-face {
|
54
|
+
font-family: $font-family;
|
55
|
+
font-style: $style;
|
56
|
+
font-weight: $weight;
|
57
|
+
src: url('#{$filepath}.eot');
|
58
|
+
src: url('#{$filepath}.eot?#iefix') format('embedded-opentype'), // alternative replace this line with: src: local('\263A'), // for smileyface syntax
|
59
|
+
url('#{$filepath}.woff') format('woff'),
|
60
|
+
url('#{$filepath}.ttf') format('truetype'),
|
61
|
+
url('#{$filepath}.svg##{$svg-font-id}') format('svg');
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
@mixin linear-gradient($color1, $color2) {
|
66
|
+
background: $color1;
|
67
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, $color1), color-stop(1, $color2));
|
68
|
+
background: -webkit-linear-gradient(top, $color1, $color2);
|
69
|
+
background: -moz-linear-gradient(top, $color1, $color2);
|
70
|
+
background: -o-linear-gradient(top, $color1, $color2);
|
71
|
+
background: -ms-linear-gradient(top, $color1, $color2);
|
72
|
+
background: linear-gradient(top, $color1, $color2);
|
73
|
+
filter: unquote('"progid:DXImageTransform.Microsoft.gradient(startColorstr="#{$color1}", endColorstr="#{$color2}",GradientType=0)"');
|
74
|
+
}
|
75
|
+
|
76
|
+
@mixin headline-variant($size) {
|
77
|
+
font-size: $size;
|
78
|
+
margin-top: $heading-margin-top - capline-pixels($size, $line-height-regular);
|
79
|
+
padding-bottom: $heading-margin-bottom - baseline-pixels($size, $line-height-regular);
|
80
|
+
|
81
|
+
&.underline, &.cluster {
|
82
|
+
margin-top: 55px - capline-pixels($size, $line-height-regular);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
@mixin price-variant($size) {
|
87
|
+
font-size: $size;
|
88
|
+
$font-size-cent: ceil($size * $price-cent-factor);
|
89
|
+
|
90
|
+
> sup {
|
91
|
+
font-size: $font-size-cent;
|
92
|
+
top: floor(capline-pixels($size, $line-height-regular)) - ceil(capline-pixels($font-size-cent, $line-height-regular));
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
@mixin emphasis-variant($color, $inactive: false) {
|
97
|
+
color: $color;
|
98
|
+
|
99
|
+
mark {
|
100
|
+
color: $color-bright;
|
101
|
+
background-color: $color;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
@mixin table-row-variant($variant, $color, $color-background, $theme-background-color) {
|
106
|
+
.table {
|
107
|
+
> thead,
|
108
|
+
> tbody,
|
109
|
+
> tfoot {
|
110
|
+
> tr {
|
111
|
+
&.#{$variant} > th,
|
112
|
+
&.#{$variant} > td,
|
113
|
+
> th.#{$variant},
|
114
|
+
> td.#{$variant} {
|
115
|
+
@if $variant == 'brand' or $variant == 'inactive' {
|
116
|
+
background: $color-background;
|
117
|
+
} @else {
|
118
|
+
background: fallback-rgba($color-background, $table-bgr-color-alpha, $theme-background-color);
|
119
|
+
}
|
120
|
+
color: $color;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
@if $variant != 'inactive' {
|
127
|
+
.table-hover {
|
128
|
+
> tbody > tr:hover {
|
129
|
+
&.#{$variant} > th,
|
130
|
+
&.#{$variant} > td,
|
131
|
+
> th.#{$variant},
|
132
|
+
> td.#{$variant} {
|
133
|
+
color: hsv-darken($color, 7%, true);
|
134
|
+
@if $variant == 'brand' {
|
135
|
+
background-color: hsv-darken($color-background, 7%, true);
|
136
|
+
} @else {
|
137
|
+
background-color: fallback-rgba($color-background, $table-bgr-color-hover-alpha, $theme-background-color);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
@mixin table-striped-variant($color-odd, $color-odd-bg) {
|
146
|
+
> tbody > tr:nth-child(odd),
|
147
|
+
> tbody > tr.odd {
|
148
|
+
> th,
|
149
|
+
> td {
|
150
|
+
background-color: $color-odd-bg;
|
151
|
+
color: $color-odd;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
&.table-hover {
|
156
|
+
> tbody > tr:nth-child(odd):hover {
|
157
|
+
> th,
|
158
|
+
> td {
|
159
|
+
background-color: hsv-darken($color-odd-bg, 7%, true);
|
160
|
+
color: hsv-darken($color-odd, 7%, true);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
@mixin box-sizing($box-model) {
|
167
|
+
-webkit-box-sizing: $box-model;
|
168
|
+
-moz-box-sizing: $box-model;
|
169
|
+
box-sizing: $box-model;
|
170
|
+
}
|
171
|
+
|
172
|
+
@mixin border-top-radius($radius) {
|
173
|
+
border-top-left-radius: $radius;
|
174
|
+
border-top-right-radius: $radius;
|
175
|
+
}
|
176
|
+
|
177
|
+
@mixin border-right-radius($radius) {
|
178
|
+
border-top-right-radius: $radius;
|
179
|
+
border-bottom-right-radius: $radius;
|
180
|
+
}
|
181
|
+
|
182
|
+
@mixin border-bottom-radius($radius) {
|
183
|
+
border-bottom-left-radius: $radius;
|
184
|
+
border-bottom-right-radius: $radius;
|
185
|
+
}
|
186
|
+
|
187
|
+
@mixin border-left-radius($radius) {
|
188
|
+
border-top-left-radius: $radius;
|
189
|
+
border-bottom-left-radius: $radius;
|
190
|
+
}
|
191
|
+
|
192
|
+
@mixin button-variant($color-text, $color-background, $color-border) {
|
193
|
+
color: $color-text;
|
194
|
+
background-color: $color-background;
|
195
|
+
border-color: $color-border;
|
196
|
+
|
197
|
+
&.focus,
|
198
|
+
&:focus {
|
199
|
+
color: $color-text;
|
200
|
+
}
|
201
|
+
|
202
|
+
&.hover,
|
203
|
+
&:hover {
|
204
|
+
color: $color-text;
|
205
|
+
background-color: hsv-darken($color-background, 7%, true);
|
206
|
+
border-color: hsv-darken($color-border, 7%, true);
|
207
|
+
}
|
208
|
+
|
209
|
+
&.active,
|
210
|
+
&:active {
|
211
|
+
color: $color-text;
|
212
|
+
background-color: hsv-darken($color-background, 13.75%, true);
|
213
|
+
border-color: hsv-darken($color-border, 15%, true);
|
214
|
+
}
|
215
|
+
|
216
|
+
&.disabled,
|
217
|
+
&[disabled] {
|
218
|
+
&,
|
219
|
+
&.focus,
|
220
|
+
&:focus,
|
221
|
+
&.hover,
|
222
|
+
&:hover {
|
223
|
+
color: hsv-lighten($font-color-regular, 50%, true);
|
224
|
+
background: hsv-lighten($color-element-background, 5%, true);
|
225
|
+
border-color: hsv-lighten($color-element-border, 14%, true);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
@mixin badge-variant($color, $font-color: null) {
|
231
|
+
background-color: $color;
|
232
|
+
color: $font-color;
|
233
|
+
}
|
234
|
+
|
235
|
+
@mixin opacity($value) {
|
236
|
+
-moz-opacity: $value;
|
237
|
+
-khtml-opacity: $value;
|
238
|
+
opacity: $value;
|
239
|
+
$opacity-ie: ($opacity * 100);
|
240
|
+
-ms-filter: unquote('progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$opacity-ie})');
|
241
|
+
filter: unquote('alpha(opacity=#{$opacity-ie})');
|
242
|
+
}
|
243
|
+
|
244
|
+
@mixin input-decoration-variant($background-color, $border-color, $theme-background-color) {
|
245
|
+
|
246
|
+
$calculated-border-color: hsv-darken($border-color, 15%, true);
|
247
|
+
|
248
|
+
.form-input {
|
249
|
+
background-color: fallback-rgba($background-color, .05, $theme-background-color);
|
250
|
+
border-color: $calculated-border-color;
|
251
|
+
|
252
|
+
&.hover,
|
253
|
+
&:hover {
|
254
|
+
background-color: fallback-rgba($background-color, .1, $theme-background-color);
|
255
|
+
border-color: hsv-darken($calculated-border-color, 7%, true);
|
256
|
+
}
|
257
|
+
|
258
|
+
&.focus,
|
259
|
+
&:focus {
|
260
|
+
background-color: $color-bright;
|
261
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten($calculated-border-color, 20%);
|
262
|
+
}
|
263
|
+
|
264
|
+
&.active,
|
265
|
+
&:active {
|
266
|
+
background-color: fallback-rgba($background-color, .15, $theme-background-color);
|
267
|
+
border-color: hsv-darken($calculated-border-color, 15%, true);
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
@mixin placeholder($color) {
|
273
|
+
&::-webkit-input-placeholder { color: $color; } // Safari, Chrome, Opera 15+
|
274
|
+
&:-moz-placeholder { color: $color; } // FF 4-18
|
275
|
+
&::-moz-placeholder { color: $color; } // FF 19+
|
276
|
+
&:-ms-input-placeholder { color: $color; } // IE10+
|
277
|
+
}
|
278
|
+
|
279
|
+
@mixin transition($transition, $type: '') {
|
280
|
+
-webkit-transition#{$type}: $transition;
|
281
|
+
-moz-transition#{$type}: $transition;
|
282
|
+
-ms-transition#{$type}: $transition;
|
283
|
+
-o-transition#{$type}: $transition;
|
284
|
+
transition#{$type}: $transition;
|
285
|
+
}
|
286
|
+
|
287
|
+
@mixin user-select($value) {
|
288
|
+
-webkit-user-select: $value;
|
289
|
+
-khtml-user-select: $value;
|
290
|
+
-moz-user-select: $value;
|
291
|
+
-o-user-select: $value;
|
292
|
+
user-select: $value;
|
293
|
+
}
|
294
|
+
|
295
|
+
@mixin pagination-variant($width, $height, $gutter) {
|
296
|
+
> li {
|
297
|
+
> a,
|
298
|
+
> span {
|
299
|
+
width: $width;
|
300
|
+
height: $height;
|
301
|
+
margin: 0 ($gutter / 2);
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
@mixin notification-variant($background-color, $border-color, $font-color: $font-color-regular) {
|
307
|
+
|
308
|
+
$calculated-border-color: hsv-darken($border-color, 15%, true);
|
309
|
+
$calculated-bgr-color: fallback-rgba($background-color, .05, $background-color-regular);
|
310
|
+
|
311
|
+
background-color: $calculated-bgr-color;
|
312
|
+
// background-color: rgba($background-color, .05); since alpha is to low
|
313
|
+
border-color: $calculated-border-color;
|
314
|
+
color: $font-color;
|
315
|
+
|
316
|
+
> .notification-badge {
|
317
|
+
background-color: $font-color;
|
318
|
+
color: $calculated-bgr-color;
|
319
|
+
}
|
320
|
+
|
321
|
+
> .close {
|
322
|
+
&.focus,
|
323
|
+
&:focus {
|
324
|
+
color: hsv-darken($font-color, 21%, true); // -21%
|
325
|
+
}
|
326
|
+
|
327
|
+
&.hover,
|
328
|
+
&:hover {
|
329
|
+
color: hsv-darken($font-color, 7%, true); // -7%
|
330
|
+
}
|
331
|
+
|
332
|
+
&.active,
|
333
|
+
&:active {
|
334
|
+
color: hsv-darken($font-color, 15%, true); // -15%
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
}
|
339
|
+
|
340
|
+
@mixin ellipsis() {
|
341
|
+
white-space: nowrap;
|
342
|
+
overflow: hidden;
|
343
|
+
text-overflow: ellipsis;
|
344
|
+
}
|
345
|
+
|
346
|
+
@mixin content-list-item-variant($name, $font-color, $background-color) {
|
347
|
+
.content-list-item-#{$name} {
|
348
|
+
color: $font-color;
|
349
|
+
background-color: $background-color;
|
350
|
+
}
|
351
|
+
|
352
|
+
a.content-list-item-#{$name} {
|
353
|
+
color: $font-color;
|
354
|
+
|
355
|
+
// focus = browser default - so not defined
|
356
|
+
|
357
|
+
&.hover,
|
358
|
+
&:hover {
|
359
|
+
background-color: hsv-darken($background-color, 7%, true);
|
360
|
+
}
|
361
|
+
|
362
|
+
&.active,
|
363
|
+
&:active {
|
364
|
+
background-color: hsv-darken($background-color, 15%, true);
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
@mixin tab-focus() {
|
370
|
+
// Default
|
371
|
+
outline: thin dotted;
|
372
|
+
// WebKit
|
373
|
+
outline: 5px auto -webkit-focus-ring-color;
|
374
|
+
outline-offset: -2px;
|
375
|
+
}
|
376
|
+
|
377
|
+
@mixin form-control-focus($bgr-color, $color: $input-border-color-focus) {
|
378
|
+
$color-rgba: rgba(red($color), green($color), blue($color), .6);
|
379
|
+
|
380
|
+
&.focus,
|
381
|
+
&:focus {
|
382
|
+
background-color: $bgr-color;
|
383
|
+
border-color: $color;
|
384
|
+
outline: 0;
|
385
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px $color-rgba;
|
386
|
+
}
|
387
|
+
}
|
388
|
+
|
389
|
+
@mixin color-variant($name, $color, $saturation: false) {
|
390
|
+
|
391
|
+
.bg-#{$name} { background-color: $color; }
|
392
|
+
|
393
|
+
@if ($saturation) {
|
394
|
+
.bg-#{$name}-25 { background-color: fallback-rgba($color, .25, $background-color-regular); }
|
395
|
+
.bg-#{$name}-50 { background-color: fallback-rgba($color, .5, $background-color-regular); }
|
396
|
+
.bg-#{$name}-75 { background-color: fallback-rgba($color, .75, $background-color-regular); }
|
397
|
+
}
|
398
|
+
|
399
|
+
}
|
400
|
+
|
401
|
+
@mixin container-fixed($offset: 0) {
|
402
|
+
// default
|
403
|
+
@if $grid-large-container-width {
|
404
|
+
@media screen and (min-width: #{$grid-large-min}px) and (max-width: #{$grid-large-max}px) {
|
405
|
+
width: (($grid-large-container-width + 1) * 1px) + $offset;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
// down-sizing
|
409
|
+
@if $grid-medium-container-width {
|
410
|
+
@media screen and (max-width: #{$grid-medium-max}px) {
|
411
|
+
width: (($grid-medium-container-width + 1) * 1px) + $offset;
|
412
|
+
}
|
413
|
+
}
|
414
|
+
@if $grid-small-container-width {
|
415
|
+
@media screen and (max-width: #{$grid-small-max}px) {
|
416
|
+
width: (($grid-small-container-width + 1) * 1px) + $offset;
|
417
|
+
}
|
418
|
+
}
|
419
|
+
@if $grid-extra-small-container-width {
|
420
|
+
@media screen and (max-width: #{$grid-extra-small-max}px) {
|
421
|
+
width: (($grid-extra-small-container-width + 1) * 1px) + $offset;
|
422
|
+
}
|
423
|
+
}
|
424
|
+
// up-sizing
|
425
|
+
@if $grid-extra-large-container-width {
|
426
|
+
@media screen and (min-width: #{$grid-extra-large-min}px) {
|
427
|
+
width: (($grid-extra-large-container-width + 1) * 1px) + $offset;
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
data/_sass/_modal.md
ADDED
@@ -0,0 +1,329 @@
|
|
1
|
+
<!--
|
2
|
+
//
|
3
|
+
//
|
4
|
+
// Modal
|
5
|
+
-->
|
6
|
+
|
7
|
+
### Aufbau des Dialogs
|
8
|
+
|
9
|
+
<div class="tc-example">
|
10
|
+
<div class="modal fade in" aria-labelledby="exampleModalLabel" aria-hidden="true" role="dialog" style="display: block; position: inherit; z-index: 0;">
|
11
|
+
<div class="modal-dialog">
|
12
|
+
<div class="modal-content">
|
13
|
+
<button type="button" class="close" data-dismiss="modal">
|
14
|
+
<span aria-hidden="true">x</span>
|
15
|
+
<span class="sr-only">Close</span>
|
16
|
+
</button>
|
17
|
+
<div class="modal-header">
|
18
|
+
<h4 class="modal-title" id="exampleModalLabel">Headline</h4>
|
19
|
+
</div>
|
20
|
+
<div class="modal-body">
|
21
|
+
<p>Content...</p>
|
22
|
+
</div>
|
23
|
+
<div class="modal-footer">
|
24
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button>
|
25
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">OK</button>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
```html
|
33
|
+
<div class="modal fade" aria-labelledby="exampleModalLabel"
|
34
|
+
aria-hidden="true" role="dialog">
|
35
|
+
<div class="modal-dialog">
|
36
|
+
<div class="modal-content">
|
37
|
+
<button type="button" class="close" data-dismiss="modal">
|
38
|
+
<span aria-hidden="true">x</span>
|
39
|
+
<span class="sr-only">Close</span>
|
40
|
+
</button>
|
41
|
+
<div class="modal-header">
|
42
|
+
<h4 class="modal-title" id="exampleModalLabel">Headline</h4>
|
43
|
+
</div>
|
44
|
+
<div class="modal-body">
|
45
|
+
<p>Content...</p>
|
46
|
+
</div>
|
47
|
+
<div class="modal-footer">
|
48
|
+
<button type="button" class="btn btn-default"
|
49
|
+
data-dismiss="modal">Schließen</button>
|
50
|
+
<button type="button" class="btn btn-default"
|
51
|
+
data-dismiss="modal">OK</button>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
```
|
57
|
+
|
58
|
+
### Initialisierung des Dialogs
|
59
|
+
|
60
|
+
<div class="tc-example">
|
61
|
+
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-init-demo">Modal-Dialog öffnen</button>
|
62
|
+
|
63
|
+
<div id="modal-init-demo" class="modal fade" aria-labelledby="exampleModalLabel2" aria-hidden="true" role="dialog">
|
64
|
+
<div class="modal-dialog">
|
65
|
+
<div class="modal-content">
|
66
|
+
<button type="button" class="close" data-dismiss="modal">
|
67
|
+
<span aria-hidden="true">x</span>
|
68
|
+
<span class="sr-only">Close</span>
|
69
|
+
</button>
|
70
|
+
<div class="modal-header">
|
71
|
+
<h4 class="modal-title" id="exampleModalLabel2">Headline</h4>
|
72
|
+
</div>
|
73
|
+
<div class="modal-body">
|
74
|
+
<p>Content...</p>
|
75
|
+
</div>
|
76
|
+
<div class="modal-footer">
|
77
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button>
|
78
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">OK</button>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
```html
|
86
|
+
<!-- Der Button öffnet den Modal-Dialog -->
|
87
|
+
<button type="button" class="btn btn-default" data-toggle="modal"
|
88
|
+
data-target="#modal-init-demo">Modal-Dialog öffnen</button>
|
89
|
+
|
90
|
+
<!-- Der Modal-Dialog -->
|
91
|
+
<div class="modal fade" aria-labelledby="exampleModalLabel"
|
92
|
+
aria-hidden="true" role="dialog">
|
93
|
+
<div class="modal-dialog">
|
94
|
+
<div class="modal-content">
|
95
|
+
<button type="button" class="close" data-dismiss="modal">
|
96
|
+
<span aria-hidden="true">x</span>
|
97
|
+
<span class="sr-only">Close</span>
|
98
|
+
</button>
|
99
|
+
<div class="modal-header">
|
100
|
+
<h4 class="modal-title" id="exampleModalLabel">Headline</h4>
|
101
|
+
</div>
|
102
|
+
<div class="modal-body">
|
103
|
+
<p>Content...</p>
|
104
|
+
</div>
|
105
|
+
<div class="modal-footer">
|
106
|
+
<button type="button" class="btn btn-default"
|
107
|
+
data-dismiss="modal">Schließen</button>
|
108
|
+
<button type="button" class="btn btn-default"
|
109
|
+
data-dismiss="modal">OK</button>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
```
|
115
|
+
|
116
|
+
### Datenmanagement
|
117
|
+
|
118
|
+
Oft sollen Daten im Modal-Dialog von außen beeinflussbar sein,
|
119
|
+
beispielsweise wenn ein Formular im Dialog vorausgefüllt werden soll.
|
120
|
+
|
121
|
+
In einem zweiten Schritt sollen beim Absenden des Formulars die Daten
|
122
|
+
verarbeitet werden können.
|
123
|
+
|
124
|
+
Das folgende Beispiel zeigt diese Fälle:
|
125
|
+
|
126
|
+
<div class="tc-example">
|
127
|
+
|
128
|
+
<button type="button" class="btn btn-default" data-toggle="modal" data-init-value="1" data-target="#modal-init-demo2">Modal-Dialog mit <1> öffnen</button>
|
129
|
+
<button type="button" class="btn btn-default" data-toggle="modal" data-init-value="2" data-target="#modal-init-demo2">Modal-Dialog mit <2> öffnen</button>
|
130
|
+
|
131
|
+
<div id="modal-init-demo2" class="modal fade" aria-labelledby="exampleModalLabel3" aria-hidden="true" role="dialog">
|
132
|
+
<div class="modal-dialog">
|
133
|
+
<div class="modal-content">
|
134
|
+
<form name="exampleModalForm3">
|
135
|
+
<button type="button" class="close" data-dismiss="modal">
|
136
|
+
<span aria-hidden="true">x</span>
|
137
|
+
<span class="sr-only">Close</span>
|
138
|
+
</button>
|
139
|
+
<div class="modal-header">
|
140
|
+
<h4 class="modal-title" id="exampleModalLabel3">Headline</h4>
|
141
|
+
</div>
|
142
|
+
<div class="modal-body">
|
143
|
+
<div class="form-input-set">
|
144
|
+
<label for="text-modal">Value</label>
|
145
|
+
<input type="text" class="form-input" name="text-modal" id="text-modal">
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
<div class="modal-footer">
|
149
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button>
|
150
|
+
<button type="submit" class="btn btn-default">Senden</button>
|
151
|
+
</div>
|
152
|
+
</form>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
```html
|
159
|
+
<!-- Der Button öffnet den Modal-Dialog -->
|
160
|
+
<button type="button" class="btn btn-default" data-toggle="modal" data-init-value="1"
|
161
|
+
data-target="#modal-init-demo2">Modal-Dialog mit <1> öffnen</button>
|
162
|
+
<button type="button" class="btn btn-default" data-toggle="modal" data-init-value="2"
|
163
|
+
data-target="#modal-init-demo2">Modal-Dialog mit <2> öffnen</button>
|
164
|
+
|
165
|
+
<!-- Der Modal-Dialog -->
|
166
|
+
<div id="modal-init-demo2" class="modal fade"
|
167
|
+
aria-labelledby="exampleModalLabel3" aria-hidden="true" role="dialog">
|
168
|
+
<div class="modal-dialog">
|
169
|
+
<div class="modal-content">
|
170
|
+
<form name="exampleModalForm3">
|
171
|
+
<button type="button" class="close" data-dismiss="modal">
|
172
|
+
<span aria-hidden="true">x</span>
|
173
|
+
<span class="sr-only">Close</span>
|
174
|
+
</button>
|
175
|
+
<div class="modal-header">
|
176
|
+
<h4 class="modal-title" id="exampleModalLabel3">Headline</h4>
|
177
|
+
</div>
|
178
|
+
<div class="modal-body">
|
179
|
+
<div class="form-input-set">
|
180
|
+
<label for="text-modal">Value</label>
|
181
|
+
<input type="text" class="form-input"
|
182
|
+
name="text-modal" id="text-modal">
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
<div class="modal-footer">
|
186
|
+
<button type="button" class="btn btn-default"
|
187
|
+
data-dismiss="modal">Schließen</button>
|
188
|
+
<button type="submit" class="btn btn-default">Senden</button>
|
189
|
+
</div>
|
190
|
+
</form>
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
```
|
195
|
+
|
196
|
+
JavaScript:
|
197
|
+
```javascript
|
198
|
+
// Daten übermitteln
|
199
|
+
$('#modal-init-demo2').on('show.tc.modal', function (event) {
|
200
|
+
var $button = $(event.relatedTarget) // der betätigte Button
|
201
|
+
var value = $button.data('init-value') // Wert aus HTML5-Data auslesen
|
202
|
+
|
203
|
+
// Wert in Modal-Formuar übernehmen
|
204
|
+
var $modal = $(this)
|
205
|
+
$modal.find('input[name="text-modal"]').val(value)
|
206
|
+
})
|
207
|
+
|
208
|
+
// Daten abholen
|
209
|
+
$('form[name="exampleModalForm3"]').on('submit', function (event) {
|
210
|
+
event.preventDefault() // Absenden des Formular unterdrücken
|
211
|
+
|
212
|
+
var $modal = $('#modal-init-demo2')
|
213
|
+
$modal.modal('hide') // den Modal-Dialog schließen
|
214
|
+
|
215
|
+
var $form = $(this)
|
216
|
+
alert($form.serialize()) // Daten aus dem Formular übernehmen
|
217
|
+
})
|
218
|
+
```
|
219
|
+
|
220
|
+
### Größe
|
221
|
+
|
222
|
+
Die Größe des Modal-Dialogs kann mit den CSS-Klassen `.modal-small`
|
223
|
+
und `.modal-large` beeinflusst werden:
|
224
|
+
|
225
|
+
```html
|
226
|
+
<!-- groß -->
|
227
|
+
<div class="modal fade" aria-labelledby="exampleModalLabel4"
|
228
|
+
aria-hidden="true" role="dialog">
|
229
|
+
<div class="modal-dialog modal-large">
|
230
|
+
...
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<!-- klein -->
|
235
|
+
<div class="modal fade" aria-labelledby="exampleModalLabel4"
|
236
|
+
aria-hidden="true" role="dialog">
|
237
|
+
<div class="modal-dialog modal-small">
|
238
|
+
...
|
239
|
+
</div>
|
240
|
+
</div>
|
241
|
+
```
|
242
|
+
|
243
|
+
## Verwendung
|
244
|
+
|
245
|
+
Der Modal-Dialog kann derzeit über zwei Schnittstellen gestartet werden.
|
246
|
+
|
247
|
+
### HTML Attribut
|
248
|
+
```html
|
249
|
+
<button type="button" data-toggle="modal" data-target="#eg-modal">Modal-Dialog</button>
|
250
|
+
```
|
251
|
+
|
252
|
+
### JavaScript
|
253
|
+
```js
|
254
|
+
$('#eg-modal').modal(options)
|
255
|
+
```
|
256
|
+
|
257
|
+
<table class="table table-small">
|
258
|
+
<caption>Optionen</caption>
|
259
|
+
<thead>
|
260
|
+
<tr>
|
261
|
+
<th>Name</th>
|
262
|
+
<th>Typ</th>
|
263
|
+
<th>Standard</th>
|
264
|
+
<th>Beschreibung</th>
|
265
|
+
</tr>
|
266
|
+
</thead>
|
267
|
+
<tbody>
|
268
|
+
<tr>
|
269
|
+
<td>backdrop</td>
|
270
|
+
<td>Bool</td>
|
271
|
+
<td>true</td>
|
272
|
+
<td>
|
273
|
+
Gibt an ob der Modal-Dialog durch einen Hintergrund abgesetzt werden soll.
|
274
|
+
Der Modal-Dialog wird bei einem Klick auf den Hintergrund geschlossen.
|
275
|
+
</td>
|
276
|
+
</tr>
|
277
|
+
<tr>
|
278
|
+
<td>keyboard</td>
|
279
|
+
<td>Bool</td>
|
280
|
+
<td>true</td>
|
281
|
+
<td>Gibt an, ob der Modal-Dialog durch drücken der ESC-Taste geschlossen wird.</td>
|
282
|
+
</tr>
|
283
|
+
<tr>
|
284
|
+
<td>show</td>
|
285
|
+
<td>Bool</td>
|
286
|
+
<td>true</td>
|
287
|
+
<td>Gibt an ob der der Modal-Dialog beim Initialisieren angezeigt werden soll.</td>
|
288
|
+
</tr>
|
289
|
+
</tbody>
|
290
|
+
</table>
|
291
|
+
|
292
|
+
```js
|
293
|
+
// Initialisieren des Modal-Dialogs ohne direkte Anzeige
|
294
|
+
$('#eg-modal').modal({ show: false })
|
295
|
+
```
|
296
|
+
|
297
|
+
<table class="table table-small">
|
298
|
+
<caption>Events</caption>
|
299
|
+
<thead>
|
300
|
+
<tr>
|
301
|
+
<th>Typ</th>
|
302
|
+
<th>Beschreibung</th>
|
303
|
+
</tr>
|
304
|
+
</thead>
|
305
|
+
<tbody>
|
306
|
+
<tr>
|
307
|
+
<td>show.tc.modal</td>
|
308
|
+
<td>Dieses Event tritt noch vor dem eigentlichen Anzeigen des Modal-Dialogs auf.</td>
|
309
|
+
</tr>
|
310
|
+
<tr>
|
311
|
+
<td>shown.tc.modal</td>
|
312
|
+
<td>Dieses Event tritt auf, wenn der Modal-Dialog fertig angezeigt wird.</td>
|
313
|
+
</tr>
|
314
|
+
<tr>
|
315
|
+
<td>hide.tc.modal</td>
|
316
|
+
<td>Dieses Event tritt noch vor dem eigentlichen Schließen des Modal-Dialogs auf.</td>
|
317
|
+
</tr>
|
318
|
+
<tr>
|
319
|
+
<td>hidden.tc.modal</td>
|
320
|
+
<td>Dieses Event tritt auf, wenn der Modal-Dialog fertig geschlossen wurde.</td>
|
321
|
+
</tr>
|
322
|
+
</tbody>
|
323
|
+
</table>
|
324
|
+
|
325
|
+
```js
|
326
|
+
$('#eg-modal').on('hide.tc.modal', function (event) {
|
327
|
+
// ...
|
328
|
+
})
|
329
|
+
```
|