zurb-foundation 3.2.5 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -2
- data/CHANGELOG.md +1 -26
- data/CONTRIBUTING.md +18 -0
- data/Gemfile.lock +19 -0
- data/Gruntfile.js +27 -0
- data/README.md +5 -6
- data/{Capfile → docs/Capfile} +0 -1
- data/docs/Gemfile +8 -0
- data/docs/Gemfile.lock +43 -0
- data/docs/Procfile +2 -0
- data/docs/README.md +1 -0
- data/docs/_sidebar-components.html.erb +109 -0
- data/docs/_sidebar.html.erb +109 -0
- data/docs/_zurb-jobs.html.erb +5 -0
- data/docs/changelog.html.erb +185 -0
- data/docs/compile.rb +43 -0
- data/docs/components/alert-boxes.html.erb +202 -0
- data/docs/components/block-grid.html.erb +118 -0
- data/docs/components/breadcrumbs.html.erb +146 -0
- data/docs/components/button-groups.html.erb +174 -0
- data/docs/components/buttons.html.erb +220 -0
- data/docs/components/clearing.html.erb +152 -0
- data/docs/components/custom-forms.html.erb +306 -0
- data/docs/components/dropdown-buttons.html.erb +233 -0
- data/docs/components/dropdown.html.erb +186 -0
- data/docs/components/flex-video.html.erb +93 -0
- data/docs/components/forms.html.erb +468 -0
- data/docs/components/grid.html.erb +355 -0
- data/docs/components/inline-lists.html.erb +89 -0
- data/docs/components/joyride.html.erb +178 -0
- data/docs/components/keystrokes.html.erb +74 -0
- data/docs/components/labels.html.erb +98 -0
- data/docs/components/magellan.html.erb +84 -0
- data/docs/components/orbit.html.erb +262 -0
- data/docs/components/pagination.html.erb +181 -0
- data/docs/components/panels.html.erb +121 -0
- data/docs/components/pricing-tables.html.erb +154 -0
- data/docs/components/progress-bars.html.erb +120 -0
- data/docs/components/reveal.html.erb +147 -0
- data/docs/components/section.html.erb +156 -0
- data/docs/components/side-nav.html.erb +122 -0
- data/docs/components/split-buttons.html.erb +218 -0
- data/docs/components/sub-nav.html.erb +120 -0
- data/docs/components/switch.html.erb +288 -0
- data/docs/components/tables.html.erb +123 -0
- data/docs/components/thumbnails.html.erb +87 -0
- data/docs/components/tooltips.html.erb +73 -0
- data/docs/components/top-bar.html.erb +219 -0
- data/docs/components/type.html.erb +359 -0
- data/docs/components/visibility.html.erb +102 -0
- data/docs/config.ru +12 -0
- data/docs/config/deploy.rb +33 -0
- data/docs/controller.rb +43 -0
- data/docs/css/_coderay.scss +116 -0
- data/docs/css/_settings.scss +1 -0
- data/docs/css/docs.scss +174 -0
- data/docs/css/normalize.scss +396 -0
- data/docs/css/qunit-composite.css +13 -0
- data/docs/css/qunit.css +235 -0
- data/docs/faq.html.erb +61 -0
- data/docs/img/demos/demo1-th.png +0 -0
- data/docs/img/demos/demo1.png +0 -0
- data/docs/img/demos/demo2-th.png +0 -0
- data/docs/img/demos/demo2.png +0 -0
- data/docs/img/demos/demo3-th.png +0 -0
- data/docs/img/demos/demo3.png +0 -0
- data/docs/img/demos/demo4-th.png +0 -0
- data/docs/img/demos/demo4.png +0 -0
- data/docs/img/demos/demo5-th.png +0 -0
- data/docs/img/demos/demo5.png +0 -0
- data/docs/index.html.erb +299 -0
- data/docs/javascript.html.erb +133 -0
- data/docs/js/docs.js +3 -0
- data/docs/js/qunit-composite.js +105 -0
- data/docs/js/qunit.js +1977 -0
- data/docs/js/tests/tabs/simple_tabs.html +57 -0
- data/docs/js/tests/tabs/simple_tabs.js +54 -0
- data/docs/js/tests/tooltips/tooltips.html +39 -0
- data/docs/js/tests/tooltips/tooltips.js +11 -0
- data/docs/layout.html.erb +99 -0
- data/docs/rails.html.erb +66 -0
- data/docs/sass.html.erb +299 -0
- data/docs/support.html.erb +134 -0
- data/foundation.gemspec +2 -4
- data/index.html +3 -23
- data/js/foundation/foundation.alerts.js +50 -0
- data/js/foundation/foundation.clearing.js +478 -0
- data/{vendor/assets/javascripts/foundation/jquery.cookie.js → js/foundation/foundation.cookie.js} +3 -1
- data/js/foundation/foundation.dropdown.js +122 -0
- data/js/foundation/foundation.forms.js +403 -0
- data/js/foundation/foundation.joyride.js +613 -0
- data/js/foundation/foundation.js +331 -0
- data/js/foundation/foundation.magellan.js +130 -0
- data/js/foundation/foundation.orbit.js +355 -0
- data/{vendor/assets/javascripts/foundation/jquery.placeholder.js → js/foundation/foundation.placeholder.js} +4 -2
- data/js/foundation/foundation.reveal.js +264 -0
- data/js/foundation/foundation.section.js +180 -0
- data/js/foundation/foundation.tooltips.js +195 -0
- data/js/foundation/foundation.topbar.js +187 -0
- data/js/foundation/index.js +16 -0
- data/{vendor/assets/javascripts/foundation/modernizr.foundation.js → js/vendor/custom.modernizr.js} +0 -0
- data/js/vendor/jquery.js +9597 -0
- data/js/vendor/zepto.js +1782 -0
- data/lib/foundation/engine.rb +8 -1
- data/lib/foundation/generators/install_generator.rb +24 -1
- data/lib/foundation/generators/templates/application.html.erb +20 -6
- data/lib/foundation/generators/templates/application.html.haml +2 -6
- data/lib/foundation/generators/templates/application.html.slim +2 -5
- data/lib/foundation/version.rb +1 -1
- data/lib/zurb-foundation.rb +7 -9
- data/package.json +9 -0
- data/scss/foundation.scss +42 -15
- data/scss/foundation/_foundation-global.scss +226 -0
- data/scss/foundation/components/_alert-boxes.scss +106 -0
- data/scss/foundation/components/_block-grid.scss +63 -0
- data/scss/foundation/components/_breadcrumbs.scss +117 -0
- data/scss/foundation/components/_button-groups.scss +59 -0
- data/scss/foundation/components/_buttons.scss +217 -0
- data/scss/foundation/components/_clearing.scss +209 -0
- data/scss/foundation/components/_custom-forms.scss +232 -0
- data/scss/foundation/components/_dropdown-buttons.scss +114 -0
- data/scss/foundation/components/_dropdown.scss +137 -0
- data/scss/foundation/components/_flex-video.scss +45 -0
- data/scss/foundation/components/_forms.scss +309 -0
- data/scss/foundation/components/_grid.scss +149 -71
- data/scss/foundation/components/_inline-lists.scss +47 -0
- data/scss/foundation/components/_joyride.scss +193 -0
- data/scss/foundation/components/_keystrokes.scss +56 -0
- data/scss/foundation/components/_labels.scss +81 -0
- data/scss/foundation/components/_magellan.scss +15 -0
- data/scss/foundation/components/_orbit.scss +193 -0
- data/scss/foundation/components/_pagination.scss +99 -0
- data/scss/foundation/components/_panels.scss +76 -0
- data/scss/foundation/components/_pricing-tables.scss +130 -0
- data/scss/foundation/components/_progress-bars.scss +68 -0
- data/scss/foundation/components/_reveal.scss +131 -0
- data/scss/foundation/components/_section.scss +194 -0
- data/scss/foundation/components/_side-nav.scss +68 -0
- data/scss/foundation/components/_split-buttons.scss +159 -0
- data/scss/foundation/components/_sub-nav.scss +67 -0
- data/scss/foundation/components/_switch.scss +242 -0
- data/scss/foundation/components/_tables.scss +80 -0
- data/scss/foundation/components/_thumbs.scss +45 -0
- data/scss/foundation/components/_tooltips.scss +113 -0
- data/scss/foundation/components/_top-bar.scss +443 -0
- data/scss/foundation/components/_type.scss +411 -0
- data/scss/foundation/components/_visibility.scss +117 -0
- data/scss/normalize.scss +396 -0
- data/templates/project/config.rb +26 -0
- data/templates/project/index.html +28 -43
- data/templates/project/manifest.rb +21 -28
- data/templates/project/scss/_settings.scss +4 -243
- data/templates/project/scss/app.scss +37 -44
- data/templates/project/scss/normalize.scss +396 -0
- data/test/stylesheets/styles.css +955 -0
- metadata +144 -153
- data/config/deploy.rb +0 -42
- data/lib/foundation/generators/layout_generator.rb +0 -28
- data/scss/foundation/_settings.scss +0 -281
- data/scss/foundation/common/_base.scss +0 -4
- data/scss/foundation/common/_forms.scss +0 -117
- data/scss/foundation/common/_globals.scss +0 -35
- data/scss/foundation/common/_ratios.scss +0 -19
- data/scss/foundation/common/_typography.scss +0 -104
- data/scss/foundation/components/modules/_all.scss +0 -10
- data/scss/foundation/components/modules/_buttons.scss +0 -178
- data/scss/foundation/components/modules/_clearing.scss +0 -61
- data/scss/foundation/components/modules/_joyride.scss +0 -33
- data/scss/foundation/components/modules/_mqueries.scss +0 -458
- data/scss/foundation/components/modules/_navbar.scss +0 -74
- data/scss/foundation/components/modules/_offcanvas.scss +0 -55
- data/scss/foundation/components/modules/_orbit.scss +0 -90
- data/scss/foundation/components/modules/_reveal.scss +0 -34
- data/scss/foundation/components/modules/_tabs.scss +0 -67
- data/scss/foundation/components/modules/_topbar.scss +0 -167
- data/scss/foundation/components/modules/_ui.scss +0 -292
- data/scss/foundation/functions/_all.scss +0 -2
- data/scss/foundation/functions/_convert-number-to-word.scss +0 -10
- data/scss/foundation/functions/_grid-calc.scss +0 -5
- data/scss/foundation/functions/modular-scale.scss +0 -3
- data/scss/foundation/mixins/_all.scss +0 -5
- data/scss/foundation/mixins/_clearfix.scss +0 -13
- data/scss/foundation/mixins/_css-triangle.scss +0 -22
- data/scss/foundation/mixins/_font-size.scss +0 -13
- data/scss/foundation/mixins/_respond-to.scss +0 -11
- data/scss/foundation/mixins/_semantic-grid.scss +0 -66
- data/test/buttons.html +0 -189
- data/test/clearing.html +0 -85
- data/test/config.rb +0 -11
- data/test/elements.html +0 -490
- data/test/forms.html +0 -371
- data/test/grid.html +0 -543
- data/test/images/orbit-demo/demo1.jpeg +0 -0
- data/test/images/orbit-demo/demo2.jpeg +0 -0
- data/test/images/orbit-demo/demo3.jpeg +0 -0
- data/test/images/orbit-demo/slider-background.jpeg +0 -0
- data/test/index.html +0 -83
- data/test/joyride.html +0 -127
- data/test/magellan.html +0 -112
- data/test/navigation.html +0 -269
- data/test/orbit.html +0 -112
- data/test/reveal.html +0 -91
- data/test/scss/_settings.scss +0 -245
- data/test/scss/styles.scss +0 -50
- data/test/tabs.html +0 -197
- data/test/template.html +0 -52
- data/test/topbar-login.html +0 -194
- data/test/topbar.html +0 -139
- data/test/type.html +0 -188
- data/vendor/assets/images/foundation/orbit/bullets.jpg +0 -0
- data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/left-arrow.png +0 -0
- data/vendor/assets/images/foundation/orbit/loading.gif +0 -0
- data/vendor/assets/images/foundation/orbit/mask-black.png +0 -0
- data/vendor/assets/images/foundation/orbit/pause-black.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
- data/vendor/assets/images/foundation/orbit/rotator-black.png +0 -0
- data/vendor/assets/images/foundation/orbit/timer-black.png +0 -0
- data/vendor/assets/javascripts/foundation/app.js +0 -41
- data/vendor/assets/javascripts/foundation/index.js +0 -19
- data/vendor/assets/javascripts/foundation/jquery.event.move.js +0 -580
- data/vendor/assets/javascripts/foundation/jquery.event.swipe.js +0 -130
- data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +0 -47
- data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +0 -20
- data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +0 -83
- data/vendor/assets/javascripts/foundation/jquery.foundation.clearing.js +0 -413
- data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +0 -502
- data/vendor/assets/javascripts/foundation/jquery.foundation.joyride.js +0 -639
- data/vendor/assets/javascripts/foundation/jquery.foundation.magellan.js +0 -96
- data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +0 -27
- data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +0 -55
- data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +0 -919
- data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +0 -794
- data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +0 -66
- data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +0 -211
- data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +0 -174
- data/vendor/assets/javascripts/foundation/jquery.js +0 -9555
- data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +0 -50
@@ -0,0 +1,68 @@
|
|
1
|
+
//
|
2
|
+
// Side Nav Variables
|
3
|
+
//
|
4
|
+
|
5
|
+
// We use this to control padding.
|
6
|
+
$side-nav-padding: emCalc(14px) 0 !default;
|
7
|
+
|
8
|
+
// We use these to control list styles.
|
9
|
+
$side-nav-list-type: none !default;
|
10
|
+
$side-nav-list-position: inside !default;
|
11
|
+
$side-nav-list-margin: 0 0 emCalc(7px) 0 !default;
|
12
|
+
|
13
|
+
// We use these to control link styles.
|
14
|
+
$side-nav-link-color: $primary-color !default;
|
15
|
+
$side-nav-link-color-active: lighten(#000, 30%) !default;
|
16
|
+
$side-nav-font-size: emCalc(14px) !default;
|
17
|
+
$side-nav-font-weight: bold !default;
|
18
|
+
|
19
|
+
// We use these to control border styles
|
20
|
+
$side-nav-divider-size: 1px !default;
|
21
|
+
$side-nav-divider-style: solid !default;
|
22
|
+
$side-nav-divider-color: darken(#fff, 10%) !default;
|
23
|
+
|
24
|
+
|
25
|
+
//
|
26
|
+
// Side Nav Mixins
|
27
|
+
//
|
28
|
+
|
29
|
+
|
30
|
+
// We use this to style the side-nav
|
31
|
+
@mixin side-nav($divider-color:$side-nav-divider-color, $font-size:$side-nav-font-size, $link-color:$side-nav-link-color) {
|
32
|
+
display: block;
|
33
|
+
margin: 0;
|
34
|
+
padding: $side-nav-padding;
|
35
|
+
list-style-type: $side-nav-list-type;
|
36
|
+
list-style-position: $side-nav-list-position;
|
37
|
+
|
38
|
+
li {
|
39
|
+
margin: $side-nav-list-margin;
|
40
|
+
font-size: $font-size;
|
41
|
+
|
42
|
+
a {
|
43
|
+
display: block;
|
44
|
+
color: $link-color;
|
45
|
+
}
|
46
|
+
|
47
|
+
&.active a {
|
48
|
+
color: $side-nav-link-color-active;
|
49
|
+
font-weight: $side-nav-font-weight;
|
50
|
+
}
|
51
|
+
|
52
|
+
&.divider {
|
53
|
+
border-top: $side-nav-divider-size $side-nav-divider-style;
|
54
|
+
height: 0;
|
55
|
+
padding: 0;
|
56
|
+
list-style: none;
|
57
|
+
border-top-color: $divider-color;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
@if $include-html-classes {
|
64
|
+
|
65
|
+
/* Side Nav */
|
66
|
+
.side-nav { @include side-nav; }
|
67
|
+
|
68
|
+
}
|
@@ -0,0 +1,159 @@
|
|
1
|
+
//
|
2
|
+
// Split Button Variables
|
3
|
+
//
|
4
|
+
|
5
|
+
// We use these to control different shared styles for Split Buttons
|
6
|
+
$split-button-function-factor: 15% !default;
|
7
|
+
$split-button-pip-color: #fff !default;
|
8
|
+
$split-button-pip-color-alt: #333 !default;
|
9
|
+
$split-button-active-bg-tint: rgba(0,0,0,0.1) !default;
|
10
|
+
|
11
|
+
// We use these to control tiny split buttons
|
12
|
+
$split-button-padding-tny: $button-tny * 9 !default;
|
13
|
+
$split-button-span-width-tny: $button-tny * 6.5 !default;
|
14
|
+
$split-button-pip-size-tny: $button-tny !default;
|
15
|
+
$split-button-pip-top-tny: $button-tny * 2 !default;
|
16
|
+
$split-button-pip-left-tny: emCalc(-5px) !default;
|
17
|
+
|
18
|
+
// We use these to control small split buttons
|
19
|
+
$split-button-padding-sml: $button-sml * 7 !default;
|
20
|
+
$split-button-span-width-sml: $button-sml * 5 !default;
|
21
|
+
$split-button-pip-size-sml: $button-sml !default;
|
22
|
+
$split-button-pip-top-sml: $button-sml * 1.5 !default;
|
23
|
+
$split-button-pip-left-sml: emCalc(-9px) !default;
|
24
|
+
|
25
|
+
// We use these to control medium split buttons
|
26
|
+
$split-button-padding-med: $button-med * 6.4 !default;
|
27
|
+
$split-button-span-width-med: $button-med * 4 !default;
|
28
|
+
$split-button-pip-size-med: $button-med - emCalc(3px) !default;
|
29
|
+
$split-button-pip-top-med: $button-med * 1.5 !default;
|
30
|
+
$split-button-pip-left-med: emCalc(-9px) !default;
|
31
|
+
|
32
|
+
// We use these to control large split buttons
|
33
|
+
$split-button-padding-lrg: $button-lrg * 6 !default;
|
34
|
+
$split-button-span-width-lrg: $button-lrg * 3.75 !default;
|
35
|
+
$split-button-pip-size-lrg: $button-lrg - emCalc(6px) !default;
|
36
|
+
$split-button-pip-top-lrg: $button-lrg + emCalc(5px) !default;
|
37
|
+
$split-button-pip-left-lrg: emCalc(-9px) !default;
|
38
|
+
|
39
|
+
|
40
|
+
//
|
41
|
+
// Split Button Mixin
|
42
|
+
//
|
43
|
+
|
44
|
+
// We use this mixin to create split buttons that build upon the button mixins
|
45
|
+
@mixin split-button($padding:medium, $pip-color:$split-button-pip-color, $span-border:$primary-color, $base-style:true) {
|
46
|
+
|
47
|
+
// With this, we can control whether or not the base styles come through.
|
48
|
+
@if $base-style {
|
49
|
+
position: relative;
|
50
|
+
|
51
|
+
// Styling for the split arrow clickable area
|
52
|
+
span {
|
53
|
+
display: block;
|
54
|
+
height: 100%;
|
55
|
+
position: absolute;
|
56
|
+
#{$default-opposite}: 0;
|
57
|
+
top: 0;
|
58
|
+
border-left: solid 1px;
|
59
|
+
|
60
|
+
// Building the triangle pip indicator
|
61
|
+
&:before {
|
62
|
+
position: absolute;
|
63
|
+
content: "";
|
64
|
+
width: 0;
|
65
|
+
height: 0;
|
66
|
+
display: block;
|
67
|
+
border-style: solid;
|
68
|
+
|
69
|
+
left: 50%;
|
70
|
+
}
|
71
|
+
|
72
|
+
&:active { background-color: $split-button-active-bg-tint; }
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
// Control the border color for the span area of the split button
|
77
|
+
@if $span-border {
|
78
|
+
span { border-left-color: darken($span-border, $split-button-function-factor); }
|
79
|
+
}
|
80
|
+
|
81
|
+
// Style of the button and clickable area for tiny sizes
|
82
|
+
@if $padding == tiny {
|
83
|
+
padding-#{$default-opposite}: $split-button-padding-tny;
|
84
|
+
|
85
|
+
span { width: $split-button-span-width-tny;
|
86
|
+
&:before {
|
87
|
+
border-width: $split-button-pip-size-tny;
|
88
|
+
top: $split-button-pip-top-tny;
|
89
|
+
margin-left: $split-button-pip-left-tny;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
// Style of the button and clickable area for small sizes
|
95
|
+
@else if $padding == small {
|
96
|
+
padding-#{$default-opposite}: $split-button-padding-sml;
|
97
|
+
|
98
|
+
span { width: $split-button-span-width-sml;
|
99
|
+
&:before {
|
100
|
+
border-width: $split-button-pip-size-sml;
|
101
|
+
top: $split-button-pip-top-sml;
|
102
|
+
margin-left: $split-button-pip-left-sml;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
// Style of the button and clickable area for default (medium) sizes
|
108
|
+
@else if $padding == medium {
|
109
|
+
padding-#{$default-opposite}: $split-button-padding-med;
|
110
|
+
|
111
|
+
span { width: $split-button-span-width-med;
|
112
|
+
&:before {
|
113
|
+
border-width: $split-button-pip-size-med;
|
114
|
+
top: $split-button-pip-top-med;
|
115
|
+
margin-left: $split-button-pip-left-med;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
// Style of the button and clickable area for large sizes
|
121
|
+
@else if $padding == large {
|
122
|
+
padding-#{$default-opposite}: $split-button-padding-lrg;
|
123
|
+
|
124
|
+
span { width: $split-button-span-width-lrg;
|
125
|
+
&:before {
|
126
|
+
border-width: $split-button-pip-size-lrg;
|
127
|
+
top: $split-button-pip-top-lrg;
|
128
|
+
margin-left: $split-button-pip-left-lrg;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
// Control the color of the triangle pip
|
134
|
+
@if $pip-color {
|
135
|
+
span:before { border-color: $pip-color transparent transparent transparent; }
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
@if $include-html-classes {
|
141
|
+
|
142
|
+
/* Split Buttons */
|
143
|
+
.split.button { @include split-button;
|
144
|
+
|
145
|
+
&.secondary { @include split-button(false, $split-button-pip-color, $secondary-color, false); }
|
146
|
+
&.alert { @include split-button(false, false, $alert-color, false); }
|
147
|
+
&.success { @include split-button(false, false, $success-color, false); }
|
148
|
+
|
149
|
+
&.tiny { @include split-button(tiny, false, false, false); }
|
150
|
+
&.small { @include split-button(small, false, false, false); }
|
151
|
+
&.large { @include split-button(large, false, false, false); }
|
152
|
+
|
153
|
+
&.secondary { @include split-button(false, $split-button-pip-color-alt, false, false); }
|
154
|
+
|
155
|
+
&.radius span { @include side-radius(right, $global-radius); }
|
156
|
+
&.round span { @include side-radius(right, 1000px); }
|
157
|
+
}
|
158
|
+
|
159
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
//
|
2
|
+
// Sub Nav Variables
|
3
|
+
//
|
4
|
+
|
5
|
+
// We use these to control margin and padding
|
6
|
+
$sub-nav-list-margin: emCalc(-4px) 0 emCalc(18px) !default;
|
7
|
+
$sub-nav-list-padding-top: emCalc(4px) !default;
|
8
|
+
|
9
|
+
// We use this to control the definition
|
10
|
+
$sub-nav-font-size: emCalc(14px) !default;
|
11
|
+
$sub-nav-font-color: #999 !default;
|
12
|
+
$sub-nav-font-weight: normal !default;
|
13
|
+
$sub-nav-text-decoration: none !default;
|
14
|
+
$sub-nav-border-radius: 1000px !default;
|
15
|
+
|
16
|
+
// We use these to control the active item styles
|
17
|
+
$sub-nav-active-font-weight: bold !default;
|
18
|
+
$sub-nav-active-bg: $primary-color !default;
|
19
|
+
$sub-nav-active-color: #fff !default;
|
20
|
+
$sub-nav-active-padding: emCalc(3px) emCalc(9px) !default;
|
21
|
+
$sub-nav-active-cursor: default !default;
|
22
|
+
|
23
|
+
//
|
24
|
+
// Sub Nav Mixins
|
25
|
+
//
|
26
|
+
|
27
|
+
@mixin sub-nav($font-color:$sub-nav-font-color, $font-size:$sub-nav-font-size, $active-bg:$sub-nav-active-bg) {
|
28
|
+
display: block;
|
29
|
+
width: auto;
|
30
|
+
overflow: hidden;
|
31
|
+
margin: $sub-nav-list-margin;
|
32
|
+
padding-top: $sub-nav-list-padding-top;
|
33
|
+
margin-#{$default-opposite}: 0;
|
34
|
+
margin-#{$default-float}: emCalc(-9px);
|
35
|
+
|
36
|
+
dt,
|
37
|
+
dd {
|
38
|
+
float: $default-float;
|
39
|
+
display: inline;
|
40
|
+
margin-#{$default-float}: emCalc(9px);
|
41
|
+
margin-bottom: emCalc(10px);
|
42
|
+
font-weight: $sub-nav-font-weight;
|
43
|
+
font-size: $font-size;
|
44
|
+
|
45
|
+
a {
|
46
|
+
color: $font-color;
|
47
|
+
text-decoration: $sub-nav-text-decoration; }
|
48
|
+
|
49
|
+
&.active a {
|
50
|
+
@include radius($sub-nav-border-radius);
|
51
|
+
font-weight: $sub-nav-active-font-weight;
|
52
|
+
background: $active-bg;
|
53
|
+
padding: $sub-nav-active-padding;
|
54
|
+
cursor: $sub-nav-active-cursor;
|
55
|
+
color: $sub-nav-active-color;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
@if $include-html-classes {
|
63
|
+
|
64
|
+
/* Side Nav */
|
65
|
+
.sub-nav { @include sub-nav; }
|
66
|
+
|
67
|
+
}
|
@@ -0,0 +1,242 @@
|
|
1
|
+
//
|
2
|
+
// Switch Variables
|
3
|
+
//
|
4
|
+
|
5
|
+
// Controlling border styles and background colors for the switch container
|
6
|
+
$switch-border-color: darken(#fff, 20%) !default;
|
7
|
+
$switch-border-style: solid !default;
|
8
|
+
$switch-border-width: 1px !default;
|
9
|
+
$switch-bg: #fff !default;
|
10
|
+
|
11
|
+
// We use these to control the switch heights for our default classes
|
12
|
+
$switch-height-tny: 22px !default;
|
13
|
+
$switch-height-sml: 28px !default;
|
14
|
+
$switch-height-med: 36px !default;
|
15
|
+
$switch-height-lrg: 44px !default;
|
16
|
+
$switch-bottom-margin: emCalc(20px) !default;
|
17
|
+
|
18
|
+
// We use these to control default font sizes for our classes.
|
19
|
+
$switch-font-size-tny: 11px !default;
|
20
|
+
$switch-font-size-sml: 12px !default;
|
21
|
+
$switch-font-size-med: 14px !default;
|
22
|
+
$switch-font-size-lrg: 17px !default;
|
23
|
+
$switch-label-side-padding: 6px !default;
|
24
|
+
|
25
|
+
// We use these to style the switch-paddle
|
26
|
+
$switch-paddle-bg: #fff !default;
|
27
|
+
$switch-paddle-fade-to-color: darken($switch-paddle-bg, 10%) !default;
|
28
|
+
$switch-paddle-border-color: darken($switch-paddle-bg, 35%) !default;
|
29
|
+
$switch-paddle-border-width: 1px !default;
|
30
|
+
$switch-paddle-border-style: solid !default;
|
31
|
+
$switch-paddle-transition-speed: .1s !default;
|
32
|
+
$switch-paddle-transition-ease: ease-out !default;
|
33
|
+
$switch-positive-color: lighten($success-color, 50%) !default;
|
34
|
+
$switch-negative-color: #f5f5f5 !default;
|
35
|
+
|
36
|
+
// Outline Style for tabbing through switches
|
37
|
+
$switch-label-outline: 1px dotted #888 !default;
|
38
|
+
|
39
|
+
|
40
|
+
//
|
41
|
+
// Switch Mixins
|
42
|
+
//
|
43
|
+
|
44
|
+
// We use this mixin to create the base styles for our switch element.
|
45
|
+
@mixin switch-base($transition-speed:$switch-paddle-transition-speed, $transition-ease:$switch-paddle-transition-ease) {
|
46
|
+
|
47
|
+
// Default position and structure for switch container.
|
48
|
+
position: relative;
|
49
|
+
width: 100%;
|
50
|
+
padding: 0;
|
51
|
+
display: block;
|
52
|
+
overflow: hidden;
|
53
|
+
border-style: $switch-border-style;
|
54
|
+
border-width: $switch-border-width;
|
55
|
+
margin-bottom: $switch-bottom-margin;
|
56
|
+
|
57
|
+
// Default label styles for type and transition
|
58
|
+
label {
|
59
|
+
position: relative;
|
60
|
+
left: 0;
|
61
|
+
z-index: 2;
|
62
|
+
float: left;
|
63
|
+
width: 50%;
|
64
|
+
height: 100%;
|
65
|
+
margin: 0;
|
66
|
+
text-align: right;
|
67
|
+
font-weight: bold;
|
68
|
+
text-align: left;
|
69
|
+
|
70
|
+
// Transition for the switch label to follow paddle
|
71
|
+
@include single-transition(all, $transition-speed, $transition-ease);
|
72
|
+
}
|
73
|
+
|
74
|
+
// So that we don't need to recreate the form with any JS, we use the
|
75
|
+
// existing radio button, but we cleverly position and hide it.
|
76
|
+
input {
|
77
|
+
position: absolute;
|
78
|
+
z-index: 3;
|
79
|
+
opacity: 0;
|
80
|
+
width: 100%;
|
81
|
+
height: 100%;
|
82
|
+
|
83
|
+
// Hover and focus styles for the paddle
|
84
|
+
&:hover,
|
85
|
+
&:focus {
|
86
|
+
cursor: pointer;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
// The toggle area for radio switches. We call is a paddle.
|
91
|
+
& > span {
|
92
|
+
position: absolute;
|
93
|
+
top: -1px;
|
94
|
+
left: -1px;
|
95
|
+
z-index: 1;
|
96
|
+
display: block;
|
97
|
+
padding: 0;
|
98
|
+
border-width: $switch-paddle-border-width;
|
99
|
+
border-style: $switch-paddle-border-style;
|
100
|
+
|
101
|
+
// Transition for the switch paddle
|
102
|
+
@include single-transition(all, $transition-speed, $transition-ease);
|
103
|
+
}
|
104
|
+
|
105
|
+
// Change text alignment for the second label
|
106
|
+
input:last-of-type + label { text-align: right; }
|
107
|
+
|
108
|
+
// When a label isn't :checked, we hide it as it slides away.
|
109
|
+
input:not(:checked) + label { opacity: 0; }
|
110
|
+
|
111
|
+
// Controlling the position of the labels as they are toggled.
|
112
|
+
input:checked { display: none; }
|
113
|
+
input { left: 0; }
|
114
|
+
input:first-of-type + label { left: -50%; }
|
115
|
+
input:first-of-type:checked + label { left: 0%; }
|
116
|
+
input:last-of-type + label { right: -50%; left: auto; }
|
117
|
+
input:last-of-type:checked + label { right: 0%; left: auto; }
|
118
|
+
|
119
|
+
// Bugfix for older Webkit, including mobile Webkit. Adapted from:
|
120
|
+
// http://css-tricks.com/webkit-sibling-bug/
|
121
|
+
-webkit-animation: webkitSiblingBugfix infinite 1s;
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
// We use this mixin to create the size styles for switches.
|
126
|
+
@mixin switch-size($height:$switch-height-med, $font-size:$switch-font-size-med, $line-height:2.3em) {
|
127
|
+
|
128
|
+
height: $height;
|
129
|
+
|
130
|
+
label {
|
131
|
+
padding: 0 emCalc($switch-label-side-padding);
|
132
|
+
line-height: $line-height;
|
133
|
+
font-size: emCalc($font-size);
|
134
|
+
}
|
135
|
+
|
136
|
+
input {
|
137
|
+
// Move the paddle to the right position
|
138
|
+
&:first-of-type:checked ~ span {
|
139
|
+
left: 100%;
|
140
|
+
margin-left: emCalc(-$height + 1px);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
& > span {
|
145
|
+
width: emCalc($height);
|
146
|
+
height: emCalc($height);
|
147
|
+
}
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
// We use this mixin to add color and other fanciness to the switches.
|
152
|
+
@mixin switch-style($paddle-bg:$switch-paddle-bg, $positive-color:$switch-positive-color, $negative-color:$switch-negative-color, $radius:false, $base-style:true) {
|
153
|
+
|
154
|
+
@if $base-style {
|
155
|
+
background: $switch-bg;
|
156
|
+
border-color: $switch-border-color;
|
157
|
+
|
158
|
+
& > span {
|
159
|
+
border-color: darken($paddle-bg, 30%);
|
160
|
+
background: $paddle-bg;
|
161
|
+
background: -moz-linear-gradient(top, $paddle-bg 0%, darken($paddle-bg, 5%) 100%);
|
162
|
+
background: -webkit-linear-gradient(top, $paddle-bg 0%, darken($paddle-bg, 5%) 100%);
|
163
|
+
background: linear-gradient(to bottom, $paddle-bg 0%, darken($paddle-bg, 5%) 100%);
|
164
|
+
|
165
|
+
// Building the alternating colored sides of the switch
|
166
|
+
-webkit-box-shadow: 2px 0 10px 0 rgba(0,0,0,0.07),
|
167
|
+
1000px 0 0 1000px $positive-color,
|
168
|
+
-2px 0 10px 0 rgba(0,0,0,0.07),
|
169
|
+
-1000px 0 0 1000px $negative-color;
|
170
|
+
box-shadow: 2px 0 10px 0 rgba(0,0,0,0.07),
|
171
|
+
1000px 0 0 980px $positive-color,
|
172
|
+
-2px 0 10px 0 rgba(0,0,0,0.07),
|
173
|
+
-1000px 0 0 1000px $negative-color;
|
174
|
+
}
|
175
|
+
|
176
|
+
&:hover,
|
177
|
+
&:focus {
|
178
|
+
& > span {
|
179
|
+
background: $paddle-bg;
|
180
|
+
background: -moz-linear-gradient(top, $paddle-bg 0%, darken($paddle-bg, 10%) 100%);
|
181
|
+
background: -webkit-linear-gradient(top, $paddle-bg 0%, darken($paddle-bg, 10%) 100%);
|
182
|
+
background: linear-gradient(to bottom, $paddle-bg 0%, darken($paddle-bg, 10%) 100%);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
&:active { background: transparent; }
|
187
|
+
}
|
188
|
+
|
189
|
+
// Setting up the radius for switches
|
190
|
+
@if $radius == true {
|
191
|
+
@include radius(4px);
|
192
|
+
& > span { @include radius(3px); }
|
193
|
+
}
|
194
|
+
@else if $radius {
|
195
|
+
@include radius($radius);
|
196
|
+
& > span { @include radius($radius - 1px); }
|
197
|
+
}
|
198
|
+
|
199
|
+
}
|
200
|
+
|
201
|
+
// We use this to quickly create switches with a single mixin
|
202
|
+
@mixin switch($transition-speed:$switch-paddle-transition-speed, $transition-ease:$switch-paddle-transition-ease, $height:$switch-height-med, $font-size:$switch-font-size-med, $line-height:2.3em, $paddle-bg:$switch-paddle-bg, $positive-color:$switch-positive-color, $negative-color:$switch-negative-color, $radius:false, $base-style:true) {
|
203
|
+
@include switch-base($transition-speed, $transition-ease);
|
204
|
+
@include switch-size($height, $font-size, $line-height);
|
205
|
+
@include switch-style($paddle-bg, $positive-color, $negative-color, $radius, $base-style);
|
206
|
+
}
|
207
|
+
|
208
|
+
@if $include-html-classes {
|
209
|
+
|
210
|
+
/* Foundation Switches */
|
211
|
+
@media only screen {
|
212
|
+
|
213
|
+
// Containing element for the radio switch
|
214
|
+
.switch {
|
215
|
+
@include switch;
|
216
|
+
|
217
|
+
// Large radio switches
|
218
|
+
&.large { @include switch-size($switch-height-lrg, $switch-font-size-lrg); }
|
219
|
+
|
220
|
+
// Small radio switches
|
221
|
+
&.small { @include switch-size($switch-height-sml, $switch-font-size-sml, 2.1em); }
|
222
|
+
|
223
|
+
// Tiny radio switches
|
224
|
+
&.tiny { @include switch-size($switch-height-tny, $switch-font-size-tny, 1.9em); }
|
225
|
+
|
226
|
+
// Add a radius to the switch
|
227
|
+
&.radius { @include radius(4px);
|
228
|
+
& > span { @include radius(3px); }
|
229
|
+
}
|
230
|
+
|
231
|
+
// Make the switch completely round, like a pill
|
232
|
+
&.round { @include radius(1000px);
|
233
|
+
& > span { @include radius(999px); }
|
234
|
+
label { padding: 0 emCalc($switch-label-side-padding + 3px); }
|
235
|
+
}
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
@-webkit-keyframes webkitSiblingBugfix { from { position: relative; } to { position: relative; } }
|
240
|
+
|
241
|
+
}
|
242
|
+
}
|