jekyll-theme-foundation 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +48 -0
- data/_includes/google-analytics.html +8 -0
- data/_includes/head.html +17 -0
- data/_includes/scripts.html +4 -0
- data/_layouts/default.html +16 -0
- data/_layouts/home.html +5 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_sass/_vendor/normalize-scss/sass/_normalize.scss +3 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/_sass/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/_sass/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/_sass/assets/foundation-float.scss +5 -0
- data/_sass/assets/foundation-prototype.scss +3 -0
- data/_sass/assets/foundation-rtl.scss +5 -0
- data/_sass/assets/foundation.scss +3 -0
- data/_sass/jekyll-theme-foundation.scss +5 -0
- data/_sass/scss/_global.scss +249 -0
- data/_sass/scss/components/_accordion-menu.scss +171 -0
- data/_sass/scss/components/_accordion.scss +155 -0
- data/_sass/scss/components/_badge.scss +63 -0
- data/_sass/scss/components/_breadcrumbs.scss +117 -0
- data/_sass/scss/components/_button-group.scss +253 -0
- data/_sass/scss/components/_button.scss +385 -0
- data/_sass/scss/components/_callout.scss +106 -0
- data/_sass/scss/components/_card.scss +129 -0
- data/_sass/scss/components/_close-button.scss +102 -0
- data/_sass/scss/components/_drilldown.scss +142 -0
- data/_sass/scss/components/_dropdown-menu.scss +274 -0
- data/_sass/scss/components/_dropdown.scss +79 -0
- data/_sass/scss/components/_flex-video.scss +1 -0
- data/_sass/scss/components/_flex.scss +117 -0
- data/_sass/scss/components/_float.scss +27 -0
- data/_sass/scss/components/_label.scss +64 -0
- data/_sass/scss/components/_media-object.scss +114 -0
- data/_sass/scss/components/_menu-icon.scss +9 -0
- data/_sass/scss/components/_menu.scss +495 -0
- data/_sass/scss/components/_off-canvas.scss +506 -0
- data/_sass/scss/components/_orbit.scss +196 -0
- data/_sass/scss/components/_pagination.scss +193 -0
- data/_sass/scss/components/_progress-bar.scss +64 -0
- data/_sass/scss/components/_responsive-embed.scss +70 -0
- data/_sass/scss/components/_reveal.scss +180 -0
- data/_sass/scss/components/_slider.scss +137 -0
- data/_sass/scss/components/_sticky.scss +39 -0
- data/_sass/scss/components/_switch.scss +247 -0
- data/_sass/scss/components/_table.scss +330 -0
- data/_sass/scss/components/_tabs.scss +196 -0
- data/_sass/scss/components/_thumbnail.scss +67 -0
- data/_sass/scss/components/_title-bar.scss +84 -0
- data/_sass/scss/components/_tooltip.scss +160 -0
- data/_sass/scss/components/_top-bar.scss +175 -0
- data/_sass/scss/components/_visibility.scss +132 -0
- data/_sass/scss/forms/_checkbox.scss +41 -0
- data/_sass/scss/forms/_error.scss +88 -0
- data/_sass/scss/forms/_fieldset.scss +53 -0
- data/_sass/scss/forms/_forms.scss +34 -0
- data/_sass/scss/forms/_help-text.scss +30 -0
- data/_sass/scss/forms/_input-group.scss +142 -0
- data/_sass/scss/forms/_label.scss +50 -0
- data/_sass/scss/forms/_meter.scss +116 -0
- data/_sass/scss/forms/_progress.scss +94 -0
- data/_sass/scss/forms/_range.scss +149 -0
- data/_sass/scss/forms/_select.scss +86 -0
- data/_sass/scss/forms/_text.scss +179 -0
- data/_sass/scss/foundation.scss +133 -0
- data/_sass/scss/grid/_classes.scss +176 -0
- data/_sass/scss/grid/_column.scss +112 -0
- data/_sass/scss/grid/_flex-grid.scss +259 -0
- data/_sass/scss/grid/_grid.scss +48 -0
- data/_sass/scss/grid/_gutter.scss +82 -0
- data/_sass/scss/grid/_layout.scss +76 -0
- data/_sass/scss/grid/_position.scss +76 -0
- data/_sass/scss/grid/_row.scss +99 -0
- data/_sass/scss/grid/_size.scss +24 -0
- data/_sass/scss/prototype/_arrow.scss +36 -0
- data/_sass/scss/prototype/_border-box.scss +35 -0
- data/_sass/scss/prototype/_border-none.scss +35 -0
- data/_sass/scss/prototype/_bordered.scss +54 -0
- data/_sass/scss/prototype/_box.scss +23 -0
- data/_sass/scss/prototype/_display.scss +50 -0
- data/_sass/scss/prototype/_font-styling.scss +95 -0
- data/_sass/scss/prototype/_list-style-type.scss +95 -0
- data/_sass/scss/prototype/_overflow.scss +72 -0
- data/_sass/scss/prototype/_position.scss +114 -0
- data/_sass/scss/prototype/_prototype.scss +87 -0
- data/_sass/scss/prototype/_relation.scss +157 -0
- data/_sass/scss/prototype/_rotate.scss +31 -0
- data/_sass/scss/prototype/_rounded.scss +54 -0
- data/_sass/scss/prototype/_separator.scss +96 -0
- data/_sass/scss/prototype/_shadow.scss +43 -0
- data/_sass/scss/prototype/_sizing.scss +73 -0
- data/_sass/scss/prototype/_spacing.scss +204 -0
- data/_sass/scss/prototype/_text-decoration.scss +48 -0
- data/_sass/scss/prototype/_text-transformation.scss +48 -0
- data/_sass/scss/prototype/_text-utilities.scss +88 -0
- data/_sass/scss/settings/_settings.scss +869 -0
- data/_sass/scss/typography/_alignment.scss +22 -0
- data/_sass/scss/typography/_base.scss +509 -0
- data/_sass/scss/typography/_helpers.scss +80 -0
- data/_sass/scss/typography/_print.scss +86 -0
- data/_sass/scss/typography/_typography.scss +26 -0
- data/_sass/scss/util/_breakpoint.scss +348 -0
- data/_sass/scss/util/_color.scss +129 -0
- data/_sass/scss/util/_direction.scss +31 -0
- data/_sass/scss/util/_flex.scss +85 -0
- data/_sass/scss/util/_math.scss +72 -0
- data/_sass/scss/util/_mixins.scss +313 -0
- data/_sass/scss/util/_selector.scss +41 -0
- data/_sass/scss/util/_typography.scss +26 -0
- data/_sass/scss/util/_unit.scss +152 -0
- data/_sass/scss/util/_util.scss +14 -0
- data/_sass/scss/util/_value.scss +160 -0
- data/_sass/scss/xy-grid/_cell.scss +169 -0
- data/_sass/scss/xy-grid/_classes.scss +476 -0
- data/_sass/scss/xy-grid/_collapse.scss +74 -0
- data/_sass/scss/xy-grid/_frame.scss +85 -0
- data/_sass/scss/xy-grid/_grid.scss +35 -0
- data/_sass/scss/xy-grid/_gutters.scss +45 -0
- data/_sass/scss/xy-grid/_layout.scss +33 -0
- data/_sass/scss/xy-grid/_position.scss +28 -0
- data/_sass/scss/xy-grid/_xy-grid.scss +51 -0
- data/assets/css/main.scss +5 -0
- data/assets/css/motion-ui.min.css +1 -0
- data/assets/js/foundation.min.js +5 -0
- data/assets/js/motion-ui.min.js +1 -0
- metadata +235 -0
@@ -0,0 +1,132 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
/// Hide an element by default, only displaying it above a certain screen size.
|
6
|
+
/// @param {Keyword} $size - Breakpoint to use. **Must be a breakpoint defined in `$breakpoints`.**
|
7
|
+
@mixin show-for($size) {
|
8
|
+
$size: map-get($breakpoints, $size);
|
9
|
+
$size: -zf-bp-to-em($size) - (1 / 16);
|
10
|
+
|
11
|
+
@include breakpoint($size down) {
|
12
|
+
display: none !important;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
/// Hide an element by default, only displaying it within a certain breakpoint.
|
17
|
+
/// @param {Keyword} $size - Breakpoint to use. **Must be a breakpoint defined in `$breakpoints`.**
|
18
|
+
@mixin show-for-only($size) {
|
19
|
+
$lower-bound-size: map-get($breakpoints, $size);
|
20
|
+
$upper-bound-size: -zf-map-next($breakpoints, $size);
|
21
|
+
|
22
|
+
// more often than not this will be correct, just one time round the loop it won't so set in scope here
|
23
|
+
$lower-bound: -zf-bp-to-em($lower-bound-size) - (1 / 16);
|
24
|
+
// test actual lower-bound-size, if 0 set it to 0em
|
25
|
+
@if strip-unit($lower-bound-size) == 0 {
|
26
|
+
$lower-bound: -zf-bp-to-em($lower-bound-size);
|
27
|
+
}
|
28
|
+
|
29
|
+
@if $upper-bound-size == null {
|
30
|
+
@media screen and (max-width: $lower-bound) {
|
31
|
+
display: none !important;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
@else {
|
35
|
+
$upper-bound: -zf-bp-to-em($upper-bound-size);
|
36
|
+
|
37
|
+
@media screen and (max-width: $lower-bound), screen and (min-width: $upper-bound) {
|
38
|
+
display: none !important;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
/// Show an element by default, and hide it above a certain screen size.
|
45
|
+
/// @param {Keyword} $size - Breakpoint to use. **Must be a breakpoint defined in `$breakpoints`.**
|
46
|
+
@mixin hide-for($size) {
|
47
|
+
@include breakpoint($size) {
|
48
|
+
display: none !important;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
/// Show an element by default, and hide it above a certain screen size.
|
53
|
+
/// @param {Keyword} $size - Breakpoint to use. **Must be a breakpoint defined in `$breakpoints`.**
|
54
|
+
@mixin hide-for-only($size) {
|
55
|
+
@include breakpoint($size only) {
|
56
|
+
display: none !important;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
@mixin foundation-visibility-classes {
|
61
|
+
// Basic hiding classes
|
62
|
+
.hide {
|
63
|
+
display: none !important;
|
64
|
+
}
|
65
|
+
|
66
|
+
.invisible {
|
67
|
+
visibility: hidden;
|
68
|
+
}
|
69
|
+
|
70
|
+
// Responsive visibility classes
|
71
|
+
@each $size in $breakpoint-classes {
|
72
|
+
@if $size != $-zf-zero-breakpoint {
|
73
|
+
.hide-for-#{$size} {
|
74
|
+
@include hide-for($size);
|
75
|
+
}
|
76
|
+
|
77
|
+
.show-for-#{$size} {
|
78
|
+
@include show-for($size);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
.hide-for-#{$size}-only {
|
83
|
+
@include hide-for-only($size);
|
84
|
+
}
|
85
|
+
|
86
|
+
.show-for-#{$size}-only {
|
87
|
+
@include show-for-only($size);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
// Screen reader visibility classes
|
92
|
+
// Need a "hide-for-sr" class? Add aria-hidden='true' to the element
|
93
|
+
.show-for-sr,
|
94
|
+
.show-on-focus {
|
95
|
+
@include element-invisible;
|
96
|
+
}
|
97
|
+
|
98
|
+
// Only display the element when it's focused
|
99
|
+
.show-on-focus {
|
100
|
+
&:active,
|
101
|
+
&:focus {
|
102
|
+
@include element-invisible-off;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// Landscape and portrait visibility
|
107
|
+
.show-for-landscape,
|
108
|
+
.hide-for-portrait {
|
109
|
+
display: block !important;
|
110
|
+
|
111
|
+
@include breakpoint(landscape) {
|
112
|
+
display: block !important;
|
113
|
+
}
|
114
|
+
|
115
|
+
@include breakpoint(portrait) {
|
116
|
+
display: none !important;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
.hide-for-landscape,
|
121
|
+
.show-for-portrait {
|
122
|
+
display: none !important;
|
123
|
+
|
124
|
+
@include breakpoint(landscape) {
|
125
|
+
display: none !important;
|
126
|
+
}
|
127
|
+
|
128
|
+
@include breakpoint(portrait) {
|
129
|
+
display: block !important;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group forms
|
7
|
+
////
|
8
|
+
|
9
|
+
@mixin foundation-form-checkbox {
|
10
|
+
[type='file'],
|
11
|
+
[type='checkbox'],
|
12
|
+
[type='radio'] {
|
13
|
+
margin: 0 0 $form-spacing;
|
14
|
+
}
|
15
|
+
|
16
|
+
// Styles for input/label siblings
|
17
|
+
[type='checkbox'] + label,
|
18
|
+
[type='radio'] + label {
|
19
|
+
display: inline-block;
|
20
|
+
vertical-align: baseline;
|
21
|
+
|
22
|
+
margin-#{$global-left}: $form-spacing * 0.5;
|
23
|
+
margin-#{$global-right}: $form-spacing;
|
24
|
+
margin-bottom: 0;
|
25
|
+
|
26
|
+
&[for] {
|
27
|
+
cursor: pointer;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
// Styles for inputs inside labels
|
32
|
+
label > [type='checkbox'],
|
33
|
+
label > [type='radio'] {
|
34
|
+
margin-#{$global-right}: $form-spacing * 0.5;
|
35
|
+
}
|
36
|
+
|
37
|
+
// Normalize file input width
|
38
|
+
[type='file'] {
|
39
|
+
width: 100%;
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group abide
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Sets if error styles should be added to inputs.
|
10
|
+
/// @type Boolean
|
11
|
+
$abide-inputs: true !default;
|
12
|
+
|
13
|
+
/// Sets if error styles should be added to labels.
|
14
|
+
/// @type Boolean
|
15
|
+
$abide-labels: true !default;
|
16
|
+
|
17
|
+
/// Background color to use for invalid text inputs.
|
18
|
+
/// @type Color
|
19
|
+
$input-background-invalid: get-color(alert) !default;
|
20
|
+
|
21
|
+
/// Color to use for labels of invalid inputs.
|
22
|
+
/// @type Color
|
23
|
+
$form-label-color-invalid: get-color(alert) !default;
|
24
|
+
|
25
|
+
/// Default font color for form error text.
|
26
|
+
/// @type Color
|
27
|
+
$input-error-color: get-color(alert) !default;
|
28
|
+
|
29
|
+
/// Default font size for form error text.
|
30
|
+
/// @type Number
|
31
|
+
$input-error-font-size: rem-calc(12) !default;
|
32
|
+
|
33
|
+
/// Default font weight for form error text.
|
34
|
+
/// @type Keyword
|
35
|
+
$input-error-font-weight: $global-weight-bold !default;
|
36
|
+
|
37
|
+
/// Styles the background and border of an input field to have an error state.
|
38
|
+
///
|
39
|
+
/// @param {Color} $background [$alert-color] - Color to use for the background and border.
|
40
|
+
/// @param {Number} $background-lighten [10%] - Lightness level of the background color.
|
41
|
+
@mixin form-input-error(
|
42
|
+
$background: $input-background-invalid,
|
43
|
+
$background-lighten: 10%
|
44
|
+
) {
|
45
|
+
&:not(:focus) {
|
46
|
+
border-color: $background;
|
47
|
+
background-color: mix($background, $white, $background-lighten);
|
48
|
+
&::placeholder {
|
49
|
+
color: $background;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
/// Adds error styles to a form element, using the values in the settings file.
|
55
|
+
@mixin form-error {
|
56
|
+
display: none;
|
57
|
+
margin-top: $form-spacing * -0.5;
|
58
|
+
margin-bottom: $form-spacing;
|
59
|
+
|
60
|
+
font-size: $input-error-font-size;
|
61
|
+
font-weight: $input-error-font-weight;
|
62
|
+
color: $input-error-color;
|
63
|
+
}
|
64
|
+
|
65
|
+
@mixin foundation-form-error {
|
66
|
+
@if $abide-inputs {
|
67
|
+
// Error class for invalid inputs
|
68
|
+
.is-invalid-input {
|
69
|
+
@include form-input-error;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
@if $abide-labels {
|
74
|
+
// Error class for labels of invalid outputs
|
75
|
+
.is-invalid-label {
|
76
|
+
color: $form-label-color-invalid;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
// Form error element
|
81
|
+
.form-error {
|
82
|
+
@include form-error;
|
83
|
+
|
84
|
+
&.is-visible {
|
85
|
+
display: block;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group forms
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Default border around custom fieldsets.
|
10
|
+
/// @type Border
|
11
|
+
$fieldset-border: 1px solid $medium-gray !default;
|
12
|
+
|
13
|
+
/// Default padding inside custom fieldsets.
|
14
|
+
/// @type Number
|
15
|
+
$fieldset-padding: rem-calc(20) !default;
|
16
|
+
|
17
|
+
/// Default margin around custom fieldsets.
|
18
|
+
/// @type Number
|
19
|
+
$fieldset-margin: rem-calc(18 0) !default;
|
20
|
+
|
21
|
+
/// Default padding between the legend text and fieldset border.
|
22
|
+
/// @type Number
|
23
|
+
$legend-padding: rem-calc(0 3) !default;
|
24
|
+
|
25
|
+
@mixin fieldset {
|
26
|
+
margin: $fieldset-margin;
|
27
|
+
padding: $fieldset-padding;
|
28
|
+
border: $fieldset-border;
|
29
|
+
|
30
|
+
legend {
|
31
|
+
// Covers up the fieldset's border to create artificial padding
|
32
|
+
margin: 0;
|
33
|
+
margin-#{$global-left}: rem-calc(-3);
|
34
|
+
padding: $legend-padding;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
@mixin foundation-form-fieldset {
|
39
|
+
fieldset {
|
40
|
+
margin: 0;
|
41
|
+
padding: 0;
|
42
|
+
border: 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
legend {
|
46
|
+
max-width: 100%;
|
47
|
+
margin-bottom: $form-spacing * 0.5;
|
48
|
+
}
|
49
|
+
|
50
|
+
.fieldset {
|
51
|
+
@include fieldset;
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group forms
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Global spacing for form elements.
|
10
|
+
/// @type Number
|
11
|
+
$form-spacing: rem-calc(16) !default;
|
12
|
+
|
13
|
+
@import 'text';
|
14
|
+
@import 'checkbox';
|
15
|
+
@import 'label';
|
16
|
+
@import 'help-text';
|
17
|
+
@import 'input-group';
|
18
|
+
@import 'fieldset';
|
19
|
+
@import 'select';
|
20
|
+
@import 'range';
|
21
|
+
@import 'progress';
|
22
|
+
@import 'meter';
|
23
|
+
@import 'error';
|
24
|
+
|
25
|
+
@mixin foundation-forms {
|
26
|
+
@include foundation-form-text;
|
27
|
+
@include foundation-form-checkbox;
|
28
|
+
@include foundation-form-label;
|
29
|
+
@include foundation-form-helptext;
|
30
|
+
@include foundation-form-prepostfix;
|
31
|
+
@include foundation-form-fieldset;
|
32
|
+
@include foundation-form-select;
|
33
|
+
@include foundation-form-error;
|
34
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group forms
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Default color for help text.
|
10
|
+
/// @type Color
|
11
|
+
$helptext-color: $black !default;
|
12
|
+
|
13
|
+
/// Default font size for help text.
|
14
|
+
/// @type Number
|
15
|
+
$helptext-font-size: rem-calc(13) !default;
|
16
|
+
|
17
|
+
/// Default font style for help text.
|
18
|
+
/// @type Keyword
|
19
|
+
$helptext-font-style: italic !default;
|
20
|
+
|
21
|
+
@mixin foundation-form-helptext {
|
22
|
+
.help-text {
|
23
|
+
$margin-top: ($form-spacing * 0.5) * -1;
|
24
|
+
|
25
|
+
margin-top: $margin-top;
|
26
|
+
font-size: $helptext-font-size;
|
27
|
+
font-style: $helptext-font-style;
|
28
|
+
color: $helptext-color;
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group forms
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Color of labels prefixed to an input.
|
10
|
+
/// @type Color
|
11
|
+
$input-prefix-color: $black !default;
|
12
|
+
|
13
|
+
/// Background color of labels prefixed to an input.
|
14
|
+
/// @type Color
|
15
|
+
$input-prefix-background: $light-gray !default;
|
16
|
+
|
17
|
+
/// Border around labels prefixed to an input.
|
18
|
+
/// @type Border
|
19
|
+
$input-prefix-border: 1px solid $medium-gray !default;
|
20
|
+
|
21
|
+
/// Left/right padding of an pre/postfixed input label
|
22
|
+
$input-prefix-padding: 1rem !default;
|
23
|
+
|
24
|
+
@mixin foundation-form-prepostfix {
|
25
|
+
$height: ($input-font-size + $form-spacing * 1.5);
|
26
|
+
|
27
|
+
.input-group {
|
28
|
+
display: if($global-flexbox, flex, table);
|
29
|
+
width: 100%;
|
30
|
+
margin-bottom: $form-spacing;
|
31
|
+
|
32
|
+
@if $global-flexbox {
|
33
|
+
align-items: stretch;
|
34
|
+
}
|
35
|
+
|
36
|
+
> :first-child {
|
37
|
+
border-radius: if($global-text-direction == rtl, 0 $input-radius $input-radius 0, $input-radius 0 0 $input-radius);
|
38
|
+
}
|
39
|
+
|
40
|
+
> :last-child {
|
41
|
+
> * {
|
42
|
+
border-radius: if($global-text-direction == rtl, $input-radius 0 0 $input-radius, 0 $input-radius $input-radius 0);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
%input-group-child {
|
48
|
+
margin: 0;
|
49
|
+
white-space: nowrap;
|
50
|
+
|
51
|
+
@if not $global-flexbox {
|
52
|
+
display: table-cell;
|
53
|
+
vertical-align: middle;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
.input-group-label {
|
58
|
+
@extend %input-group-child;
|
59
|
+
padding: 0 $input-prefix-padding;
|
60
|
+
border: $input-prefix-border;
|
61
|
+
background: $input-prefix-background;
|
62
|
+
|
63
|
+
color: $input-prefix-color;
|
64
|
+
text-align: center;
|
65
|
+
white-space: nowrap;
|
66
|
+
|
67
|
+
@if $global-flexbox {
|
68
|
+
display: flex;
|
69
|
+
flex: 0 0 auto;
|
70
|
+
align-items: center;
|
71
|
+
}
|
72
|
+
@else {
|
73
|
+
width: 1%;
|
74
|
+
height: 100%;
|
75
|
+
}
|
76
|
+
|
77
|
+
@if has-value($input-prefix-border) {
|
78
|
+
&:first-child {
|
79
|
+
border-#{$global-right}: 0;
|
80
|
+
}
|
81
|
+
|
82
|
+
&:last-child {
|
83
|
+
border-#{$global-left}: 0;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.input-group-field {
|
89
|
+
@extend %input-group-child;
|
90
|
+
border-radius: 0;
|
91
|
+
|
92
|
+
@if $global-flexbox {
|
93
|
+
flex: 1 1 0px; // sass-lint:disable-line zero-unit
|
94
|
+
height: auto;
|
95
|
+
min-width: 0;
|
96
|
+
}
|
97
|
+
@else {
|
98
|
+
height: $height;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
.input-group-button {
|
103
|
+
@extend %input-group-child;
|
104
|
+
padding-top: 0;
|
105
|
+
padding-bottom: 0;
|
106
|
+
text-align: center;
|
107
|
+
|
108
|
+
@if $global-flexbox {
|
109
|
+
display: flex;
|
110
|
+
flex: 0 0 auto;
|
111
|
+
}
|
112
|
+
@else {
|
113
|
+
width: 1%;
|
114
|
+
height: 100%;
|
115
|
+
}
|
116
|
+
|
117
|
+
a,
|
118
|
+
input,
|
119
|
+
button,
|
120
|
+
label {
|
121
|
+
@extend %input-group-child;
|
122
|
+
|
123
|
+
@if $global-flexbox {
|
124
|
+
height: auto;
|
125
|
+
align-self: stretch;
|
126
|
+
}
|
127
|
+
@else {
|
128
|
+
height: $height;
|
129
|
+
}
|
130
|
+
padding-top: 0;
|
131
|
+
padding-bottom: 0;
|
132
|
+
font-size: $input-font-size;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
// Specificity bump needed to prevent override by buttons
|
137
|
+
@if not $global-flexbox {
|
138
|
+
.input-group .input-group-button {
|
139
|
+
display: table-cell;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group forms
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Color for form labels.
|
10
|
+
/// @type Color
|
11
|
+
$form-label-color: $black !default;
|
12
|
+
|
13
|
+
/// Font size for form labels.
|
14
|
+
/// @type Number
|
15
|
+
$form-label-font-size: rem-calc(14) !default;
|
16
|
+
|
17
|
+
/// Font weight for form labels.
|
18
|
+
/// @type Keyword
|
19
|
+
$form-label-font-weight: $global-weight-normal !default;
|
20
|
+
|
21
|
+
/// Line height for form labels. The higher the number, the more space between the label and its input field.
|
22
|
+
/// @type Number
|
23
|
+
$form-label-line-height: 1.8 !default;
|
24
|
+
|
25
|
+
@mixin form-label {
|
26
|
+
display: block;
|
27
|
+
margin: 0;
|
28
|
+
|
29
|
+
font-size: $form-label-font-size;
|
30
|
+
font-weight: $form-label-font-weight;
|
31
|
+
line-height: $form-label-line-height;
|
32
|
+
color: $form-label-color;
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin form-label-middle {
|
36
|
+
$input-border-width: get-border-value($input-border, width);
|
37
|
+
|
38
|
+
margin: 0 0 $form-spacing;
|
39
|
+
padding: ($form-spacing / 2 + rem-calc($input-border-width)) 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
@mixin foundation-form-label {
|
43
|
+
label {
|
44
|
+
@include form-label;
|
45
|
+
|
46
|
+
&.middle {
|
47
|
+
@include form-label-middle;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
// Foundation for Sites by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
////
|
6
|
+
/// @group meter
|
7
|
+
////
|
8
|
+
|
9
|
+
/// Height of a `<meter>` element.
|
10
|
+
/// @type Length
|
11
|
+
$meter-height: 1rem !default;
|
12
|
+
|
13
|
+
/// Border radius of a `<meter>` element.
|
14
|
+
/// @type Length
|
15
|
+
$meter-radius: $global-radius !default;
|
16
|
+
|
17
|
+
/// Background color of a `<meter>` element.
|
18
|
+
/// @type Color
|
19
|
+
$meter-background: $medium-gray !default;
|
20
|
+
|
21
|
+
/// Meter fill for an optimal value in a `<meter>` element.
|
22
|
+
/// @type Color
|
23
|
+
$meter-fill-good: $success-color !default;
|
24
|
+
|
25
|
+
/// Meter fill for an average value in a `<meter>` element.
|
26
|
+
/// @type Color
|
27
|
+
$meter-fill-medium: $warning-color !default;
|
28
|
+
|
29
|
+
/// Meter fill for a suboptimal value in a `<meter>` element.
|
30
|
+
/// @type Color
|
31
|
+
$meter-fill-bad: $alert-color !default;
|
32
|
+
|
33
|
+
@mixin foundation-meter-element {
|
34
|
+
meter {
|
35
|
+
display: block;
|
36
|
+
width: 100%;
|
37
|
+
height: $meter-height;
|
38
|
+
margin-bottom: 1rem;
|
39
|
+
|
40
|
+
// Disable `-webkit-appearance: none` from getting prefixed,
|
41
|
+
// We have disabled autoprefixer first and are just only using
|
42
|
+
// `-moz-appearance: none` as a prefix and neglecting the webkit.
|
43
|
+
|
44
|
+
/*! autoprefixer: off */
|
45
|
+
-moz-appearance: none;
|
46
|
+
appearance: none;
|
47
|
+
|
48
|
+
@if has-value($meter-radius) {
|
49
|
+
border-radius: $meter-radius;
|
50
|
+
}
|
51
|
+
|
52
|
+
// For Firefox
|
53
|
+
border: 0;
|
54
|
+
background: $meter-background;
|
55
|
+
|
56
|
+
// Chrome/Safari/Edge
|
57
|
+
&::-webkit-meter-bar {
|
58
|
+
border: 0;
|
59
|
+
@if has-value($meter-radius) {
|
60
|
+
border-radius: $meter-radius;
|
61
|
+
}
|
62
|
+
|
63
|
+
background: $meter-background;
|
64
|
+
}
|
65
|
+
|
66
|
+
&::-webkit-meter-inner-element {
|
67
|
+
@if has-value($meter-radius) {
|
68
|
+
border-radius: $meter-radius;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
&::-webkit-meter-optimum-value {
|
73
|
+
background: $meter-fill-good;
|
74
|
+
|
75
|
+
@if has-value($meter-radius) {
|
76
|
+
border-radius: $meter-radius;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
&::-webkit-meter-suboptimum-value {
|
81
|
+
background: $meter-fill-medium;
|
82
|
+
|
83
|
+
@if has-value($meter-radius) {
|
84
|
+
border-radius: $meter-radius;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
&::-webkit-meter-even-less-good-value {
|
89
|
+
background: $meter-fill-bad;
|
90
|
+
|
91
|
+
@if has-value($meter-radius) {
|
92
|
+
border-radius: $meter-radius;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
&::-moz-meter-bar {
|
97
|
+
background: $primary-color;
|
98
|
+
|
99
|
+
@if has-value($meter-radius) {
|
100
|
+
border-radius: $meter-radius;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
&:-moz-meter-optimum::-moz-meter-bar { // sass-lint:disable-line force-pseudo-nesting
|
105
|
+
background: $meter-fill-good;
|
106
|
+
}
|
107
|
+
|
108
|
+
&:-moz-meter-sub-optimum::-moz-meter-bar { // sass-lint:disable-line force-pseudo-nesting
|
109
|
+
background: $meter-fill-medium;
|
110
|
+
}
|
111
|
+
|
112
|
+
&:-moz-meter-sub-sub-optimum::-moz-meter-bar { // sass-lint:disable-line force-pseudo-nesting
|
113
|
+
background: $meter-fill-bad;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|