zurb-foundation 3.0.9 → 3.1.0.rc1
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.
- data/lib/foundation/version.rb +1 -1
- data/scss/foundation/_settings.scss +40 -1
- data/scss/foundation/common/_forms.scss +15 -15
- data/scss/foundation/common/_globals.scss +6 -2
- data/scss/foundation/common/_typography.scss +7 -5
- data/scss/foundation/components/_grid.scss +20 -20
- data/scss/foundation/components/modules/_all.scss +1 -0
- data/scss/foundation/components/modules/_buttons.scss +33 -33
- data/scss/foundation/components/modules/_navbar.scss +26 -23
- data/scss/foundation/components/modules/_orbit.scss +24 -24
- data/scss/foundation/components/modules/_reveal.scss +10 -10
- data/scss/foundation/components/modules/_tabs.scss +16 -13
- data/scss/foundation/components/modules/_topbar.scss +246 -0
- data/scss/foundation/components/modules/_ui.scss +57 -29
- data/scss/foundation/mixins/_css-triangle.scss +1 -1
- data/templates/project/scss/_settings.scss +32 -2
- data/templates/project/scss/app.scss +1 -0
- data/test/buttons.html +18 -8
- data/test/elements.html +62 -18
- data/test/forms.html +25 -49
- data/test/index.html +1 -0
- data/test/navigation.html +1 -1
- data/test/reveal.html +24 -7
- data/test/scss/_settings.scss +142 -74
- data/test/tabs.html +1 -1
- data/test/topbar.html +188 -0
- data/vendor/assets/javascripts/foundation/app.js +33 -21
- data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +6 -4
- data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +6 -5
- data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +13 -7
- data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +5 -4
- data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +8 -6
- data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +3 -2
- data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +208 -6
- data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +5 -6
- data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +3 -2
- data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +13 -7
- data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +139 -0
- data/vendor/assets/javascripts/foundation/jquery.js +3416 -3519
- data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +2 -2
- metadata +10 -9
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
.nav-bar { height: $navBarHeight; background: lighten($black, 30%); margin-top: $navBarHeight / 2; padding: 0;
|
|
5
5
|
|
|
6
|
-
&>li { float:
|
|
6
|
+
&>li { float: $defaultFloat; display: block; position: relative; padding: 0; margin: 0; border: 1px solid lighten($black, 20%); border-#{$defaultOpposite}: none; line-height: $navBarHeight - 2; @include box-shadow(1px 0 0 fade-out($shinyEdge, .3) inset);
|
|
7
7
|
|
|
8
8
|
&:first-child { @include box-shadow(0 0 0); }
|
|
9
|
-
&:last-child { border
|
|
9
|
+
&:last-child { border-#{$defaultOpposite}: solid 1px lighten($black, 20%); @include box-shadow(1px 0 0 fade-out($shinyEdge, .3) inset, 1px 0 0 fade-out($shinyEdge, .3)); }
|
|
10
10
|
|
|
11
11
|
&.active { background: $mainColor; border-color: darken($mainColor, 10%);
|
|
12
12
|
&>a { color: $white; cursor: default; }
|
|
@@ -19,34 +19,36 @@
|
|
|
19
19
|
.flyout { display: none; }
|
|
20
20
|
|
|
21
21
|
&.has-flyout {
|
|
22
|
-
&>a:first-child { padding
|
|
23
|
-
&:after { @include cssTriangle(4px, darken($white, 10%), top); position: absolute;
|
|
22
|
+
&>a:first-child { padding-#{$defaultOpposite}: $navBarHeight; position: relative;
|
|
23
|
+
&:after { @include cssTriangle(4px, darken($white, 10%), top); position: absolute; #{$defaultOpposite}: $navBarHeight / 2; top: ($navBarHeight / 2) - 3; }
|
|
24
24
|
}
|
|
25
|
-
&>a.flyout-toggle { border
|
|
25
|
+
&>a.flyout-toggle { border-#{$defaultFloat}: 0 !important; position: absolute; #{$defaultOpposite}: 0; top: 0; padding: ($navBarHeight / 2); z-index: 2; display: block; }
|
|
26
26
|
&.is-touch {
|
|
27
|
-
&>a:first-child { padding
|
|
28
|
-
&>a.flyout-toggle { border
|
|
27
|
+
&>a:first-child { padding-#{$defaultOpposite}: 55px;}
|
|
28
|
+
&>a.flyout-toggle { border-#{$defaultFloat}: 1px dashed #666; }
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
&>li>a:first-child { position: relative; padding: 0
|
|
33
|
+
&>li>a:first-child { position: relative; padding: 0 ($navBarHeight / 2); display: block; text-decoration: none; font-size: ms(0); }
|
|
34
34
|
&>li>input { margin: 0 10px; }
|
|
35
35
|
|
|
36
36
|
&.vertical { height: auto; margin-top: 0;
|
|
37
37
|
|
|
38
|
-
&>li { float: none; border-bottom: none;
|
|
38
|
+
&>li { float: none; border-bottom: none; border-#{$defaultOpposite}: solid 1px lighten($black, 20%); @include box-shadow(none);
|
|
39
39
|
|
|
40
|
-
&.has-flyout>a:first-child:after { @include cssTriangle(4px, darken($white, 10%),
|
|
41
|
-
.flyout {
|
|
42
|
-
&.right {
|
|
40
|
+
&.has-flyout>a:first-child:after { @include cssTriangle(4px, darken($white, 10%), $defaultFloat); }
|
|
41
|
+
.flyout { #{$defaultFloat}: 100%; top: -1px;
|
|
42
|
+
&.right { #{$defaultFloat}: auto; #{$defaultOpposite}: 100%; }
|
|
43
43
|
}
|
|
44
|
+
&.active { border-#{$defaultOpposite}: solid 1px darken($mainColor, 10%); }
|
|
45
|
+
&:last-child { border-bottom: solid 1px lighten($black, 20%);}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
.flyout { background: darken($white, 5%); padding:
|
|
51
|
+
.flyout { background: darken($white, 5%); padding: $navBarHeight / 2; margin: 0; border: 1px solid darken($white, 15%); position: absolute; top: $navBarHeight - 1; #{$defaultFloat}: -1px; width: $navFlyoutBaseWidth; z-index: 40; @include box-shadow(0 1px 5px rgba(#000, .1));
|
|
50
52
|
|
|
51
53
|
p { line-height: 1.2; font-size: ms(0) - 1; }
|
|
52
54
|
*:first-child { margin-top: 0; } /* remove margin on any first-child element */
|
|
@@ -56,17 +58,18 @@
|
|
|
56
58
|
&.large { width: $navFlyoutBaseWidth * 1.75; }
|
|
57
59
|
|
|
58
60
|
&.right { left: auto; right: -2px; }
|
|
61
|
+
&.left { right: auto; left: -2px; }
|
|
59
62
|
&.up { top: auto; bottom: $navBarHeight - 1; }
|
|
60
63
|
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
ul.flyout, .nav-bar li ul { padding: 0; list-style: none;
|
|
64
67
|
|
|
65
|
-
li { border
|
|
66
|
-
a { background: darken($white, 5%); border: 1px solid darken($white, 10%); border-width: 1px 1px 0 0; color: #555; display: block; font-size: ms(0); height: auto; line-height: 1; padding:
|
|
68
|
+
li { border-#{$defaultFloat}: solid 3px #CCC;
|
|
69
|
+
a { background: darken($white, 5%); border: 1px solid darken($white, 10%); border-width: 1px 1px 0 0; color: #555; display: block; font-size: ms(0); height: auto; line-height: 1; padding: (($navBarHeight / 2) - 5) ($navBarHeight / 2); @include box-shadow(0 1px 0 $shinyEdge inset);
|
|
67
70
|
&:hover { background: darken($white, 8%); color: #333; }
|
|
68
71
|
}
|
|
69
|
-
&.active { margin-top: 0; border-top: 1px solid lighten($black, 30%); border
|
|
72
|
+
&.active { margin-top: 0; border-top: 1px solid lighten($black, 30%); border-#{$defaultFloat}: 4px solid lighten($black, 10%);
|
|
70
73
|
a { background: lighten($black, 30%); border: none; color: #fff; height: auto; margin: 0; position: static; top: 0; @include box-shadow(0 0 0); }
|
|
71
74
|
}
|
|
72
75
|
}
|
|
@@ -76,30 +79,30 @@
|
|
|
76
79
|
|
|
77
80
|
/* Mobile Styles */
|
|
78
81
|
@media only screen and (max-device-width: 1280px) {
|
|
79
|
-
.touch .nav-bar li.has-flyout>a { padding
|
|
82
|
+
.touch .nav-bar li.has-flyout>a { padding-#{$defaultOpposite}: 36px !important; }
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
@media only screen and (max-width: $screenMedium) and (min-width: $screenSmall) {
|
|
83
86
|
.touch .nav-bar li a { @include font-size(13); }
|
|
84
|
-
.touch .nav-bar li.has-flyout>a.flyout-toggle { padding:
|
|
85
|
-
.touch .nav-bar li.has-flyout>a { padding
|
|
87
|
+
.touch .nav-bar li.has-flyout>a.flyout-toggle { padding: ($navBarHeight / 2) !important; }
|
|
88
|
+
.touch .nav-bar li.has-flyout>a { padding-#{$defaultOpposite}: ($navBarHeight - 4) !important; }
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
@media only screen and (max-width: $screenSmall - 1) {
|
|
89
92
|
.nav-bar { height: auto;
|
|
90
93
|
|
|
91
94
|
&>li { float: none; display: block; border-right: none; }
|
|
92
|
-
&>li>a.main { text-align:
|
|
95
|
+
&>li>a.main { text-align: $defaultFloat; border-top: 1px solid #ddd; border-#{$defaultOpposite}: none; }
|
|
93
96
|
&>li:first-child>a.main { border-top: none; }
|
|
94
|
-
&>li.has-flyout>a.flyout-toggle { position: absolute;
|
|
97
|
+
&>li.has-flyout>a.flyout-toggle { position: absolute; #{$defaultOpposite}: 0; top: 0; padding: ($navBarHeight / 2)+2; z-index: 2; display: block; }
|
|
95
98
|
&>li.has-flyout.is-touch>a.flyout-toggle span { content: ""; width: 0; height: 0; display: block; }
|
|
96
99
|
&>li.has-flyout>a.flyout-toggle:hover span { border-top-color: #141414; }
|
|
97
100
|
&.vertical>li.has-flyout>.flyout { left: 0; }
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
.flyout { position: relative; width: 100% !important; top: auto; margin
|
|
103
|
+
.flyout { position: relative; width: 100% !important; top: auto; margin-#{$defaultOpposite}: -2px; border-width: 1px 1px 0 1px;
|
|
101
104
|
|
|
102
|
-
&.right { float: none; right: auto;
|
|
105
|
+
&.right { float: none; right: auto; #{$defaultFloat}: -1px; }
|
|
103
106
|
&.small, &.large { width: 100% !important; }
|
|
104
107
|
p:last-child { margin-bottom: 18px; }
|
|
105
108
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
max-width: 100%;
|
|
26
26
|
position: absolute;
|
|
27
27
|
top: 0;
|
|
28
|
-
|
|
28
|
+
#{$defaultFloat}: 0; }
|
|
29
29
|
|
|
30
30
|
div.orbit a.orbit-slide {
|
|
31
31
|
border: none;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
overflow: hidden;
|
|
47
47
|
position: absolute;
|
|
48
48
|
top: 10px;
|
|
49
|
-
|
|
49
|
+
#{$defaultOpposite}: 10px;
|
|
50
50
|
opacity: .6;
|
|
51
51
|
cursor: pointer;
|
|
52
52
|
z-index: 31; }
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
height: 40px;
|
|
58
58
|
position: absolute;
|
|
59
59
|
top: 0;
|
|
60
|
-
|
|
60
|
+
#{$defaultFloat}: -20px;
|
|
61
61
|
background: image-url("foundation/orbit/rotator-black.png") no-repeat;
|
|
62
62
|
z-index: 3; }
|
|
63
63
|
|
|
@@ -67,16 +67,16 @@
|
|
|
67
67
|
height: 40px;
|
|
68
68
|
position: absolute;
|
|
69
69
|
top: 0;
|
|
70
|
-
|
|
70
|
+
#{$defaultOpposite}: 0;
|
|
71
71
|
z-index: 2;
|
|
72
72
|
overflow: hidden; }
|
|
73
73
|
|
|
74
74
|
div.orbit-wrapper span.rotator.move {
|
|
75
|
-
|
|
75
|
+
#{$defaultFloat}: 0 }
|
|
76
76
|
|
|
77
77
|
div.orbit-wrapper span.mask.move {
|
|
78
78
|
width: 40px;
|
|
79
|
-
|
|
79
|
+
#{$defaultFloat}: 0;
|
|
80
80
|
background: image-url("foundation/orbit/timer-black.png") repeat 0 0; }
|
|
81
81
|
|
|
82
82
|
div.orbit-wrapper span.pause {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
height: 40px;
|
|
86
86
|
position: absolute;
|
|
87
87
|
top: 0;
|
|
88
|
-
|
|
88
|
+
#{$defaultFloat}: 0;
|
|
89
89
|
background: image-url("foundation/orbit/pause-black.png") no-repeat;
|
|
90
90
|
z-index: 4;
|
|
91
91
|
opacity: 0; }
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
padding: 7px 0;
|
|
113
113
|
@include font-size(13);
|
|
114
114
|
position: absolute;
|
|
115
|
-
|
|
115
|
+
#{$defaultOpposite}: 0;
|
|
116
116
|
bottom: 0;
|
|
117
117
|
width: 100%; }
|
|
118
118
|
|
|
@@ -131,19 +131,19 @@
|
|
|
131
131
|
margin-top: -25px;
|
|
132
132
|
cursor: pointer; }
|
|
133
133
|
|
|
134
|
-
div.orbit-wrapper div.slider-nav span
|
|
135
|
-
background: image-url("foundation/orbit
|
|
134
|
+
div.orbit-wrapper div.slider-nav span.#{$defaultOpposite} {
|
|
135
|
+
background: image-url("foundation/orbit/#{$defaultOpposite}-arrow.png");
|
|
136
136
|
background-size: 100%;
|
|
137
|
-
|
|
137
|
+
#{$defaultOpposite}: 0; }
|
|
138
138
|
|
|
139
|
-
div.orbit-wrapper div.slider-nav span
|
|
140
|
-
background: image-url("foundation/orbit
|
|
139
|
+
div.orbit-wrapper div.slider-nav span.#{$defaultFloat} {
|
|
140
|
+
background: image-url("foundation/orbit/#{$defaultFloat}-arrow.png");
|
|
141
141
|
background-size: 100%;
|
|
142
|
-
|
|
142
|
+
#{$defaultFloat}: 0; }
|
|
143
143
|
|
|
144
144
|
.lt-ie9 {
|
|
145
|
-
div.orbit-wrapper div.slider-nav span
|
|
146
|
-
div.orbit-wrapper div.slider-nav span
|
|
145
|
+
div.orbit-wrapper div.slider-nav span.#{$defaultOpposite} { background: image-url("foundation/orbit/#{$defaultOpposite}-arrow-small.png"); }
|
|
146
|
+
div.orbit-wrapper div.slider-nav span.#{$defaultFloat} { background: image-url("foundation/orbit/#{$defaultFloat}-arrow-small.png"); }
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
/* Bullet Nav ---------------------- */
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
z-index: 30;
|
|
154
154
|
list-style: none;
|
|
155
155
|
bottom: -40px;
|
|
156
|
-
|
|
157
|
-
margin
|
|
156
|
+
#{$defaultFloat}: 50%;
|
|
157
|
+
margin-#{$defaultFloat}: -50px;
|
|
158
158
|
padding: 0; }
|
|
159
159
|
|
|
160
160
|
ul.orbit-bullets li {
|
|
161
|
-
float:
|
|
162
|
-
margin
|
|
161
|
+
float: $defaultFloat;
|
|
162
|
+
margin-#{$defaultFloat}: 5px;
|
|
163
163
|
cursor: pointer;
|
|
164
164
|
color: #999;
|
|
165
165
|
text-indent: -9999px;
|
|
@@ -197,13 +197,13 @@
|
|
|
197
197
|
z-index: 30;
|
|
198
198
|
list-style: none;
|
|
199
199
|
bottom: -50px;
|
|
200
|
-
|
|
201
|
-
margin
|
|
200
|
+
#{$defaultFloat}: 50%;
|
|
201
|
+
margin-#{$defaultFloat}: -50px;
|
|
202
202
|
padding: 0; }
|
|
203
203
|
|
|
204
204
|
ul.orbit-bullets li {
|
|
205
|
-
float:
|
|
206
|
-
margin
|
|
205
|
+
float: $defaultFloat;
|
|
206
|
+
margin-#{$defaultFloat}: 5px;
|
|
207
207
|
cursor: pointer;
|
|
208
208
|
color: #999;
|
|
209
209
|
text-indent: -9999px;
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
/* Reveal Modals ---------------------- */
|
|
8
8
|
|
|
9
|
-
.reveal-modal-bg { position: fixed; height: 100%; width: 100%; background: #000; background: rgba(#000, .45); z-index: 40; display: none; top: 0;
|
|
9
|
+
.reveal-modal-bg { position: fixed; height: 100%; width: 100%; background: #000; background: rgba(#000, .45); z-index: 40; display: none; top: 0; #{$defaultFloat}: 0; }
|
|
10
10
|
|
|
11
|
-
.reveal-modal { background: $white; visibility: hidden; display: none; top: 100px;
|
|
11
|
+
.reveal-modal { background: $white; visibility: hidden; display: none; top: 100px; #{$defaultFloat}: 50%; margin-#{$defaultFloat}: -260px; width: 520px; position: absolute; z-index: 41; padding: 30px; @include box-shadow(0 0 10px rgba(#000,.4));
|
|
12
12
|
*:first-child { margin-top: 0; }
|
|
13
13
|
*:last-child { margin-bottom: 0; }
|
|
14
14
|
.close-reveal-modal {
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
line-height: .5;
|
|
17
17
|
position: absolute;
|
|
18
18
|
top: 8px;
|
|
19
|
-
|
|
19
|
+
#{$defaultOpposite}: 11px;
|
|
20
20
|
color: #aaa;
|
|
21
21
|
text-shadow: 0 -1px 1px rgba(0,0,0,.6);
|
|
22
22
|
font-weight: bold;
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
}
|
|
25
|
-
&.small { width: 30%; margin
|
|
26
|
-
&.medium { width: 40%; margin
|
|
27
|
-
&.large { width: 60%; margin
|
|
28
|
-
&.xlarge { width: 70%; margin
|
|
29
|
-
&.expand { width: 90%; margin
|
|
30
|
-
.row { min-width: 0; }
|
|
25
|
+
&.small { width: 30%; margin-#{$defaultFloat}: -15%; }
|
|
26
|
+
&.medium { width: 40%; margin-#{$defaultFloat}: -20%; }
|
|
27
|
+
&.large { width: 60%; margin-#{$defaultFloat}: -30%; }
|
|
28
|
+
&.xlarge { width: 70%; margin-#{$defaultFloat}: -35%; }
|
|
29
|
+
&.expand { width: 90%; margin-#{$defaultFloat}: -45%; }
|
|
30
|
+
.row { min-width: 0; margin-bottom: 10px; }
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/* Mobile */
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
.reveal-modal.small,
|
|
39
39
|
.reveal-modal.medium,
|
|
40
40
|
.reveal-modal.large,
|
|
41
|
-
.reveal-modal.xlarge { width: 80%; top: 15px;
|
|
41
|
+
.reveal-modal.xlarge { width: 80%; top: 15px; #{$defaultFloat}: 50%; margin-#{$defaultFloat}: -40%; padding: 20px; height: auto; }
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/* NOTES
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/* Requires
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
-globals.css
|
|
3
|
+
-app.js */
|
|
4
4
|
|
|
5
5
|
/* Tabs ---------------------- */
|
|
6
6
|
|
|
7
7
|
dl.tabs { border-bottom: solid 1px darken($white, 10%); display: block; height: $tabHeight; padding: 0; margin-bottom: 20px;
|
|
8
8
|
&.contained { margin-bottom: 0; }
|
|
9
9
|
|
|
10
|
-
dt { color: darken($white, 30%); cursor: default; display: block; float:
|
|
11
|
-
&:first-child { padding: 0 9px
|
|
10
|
+
dt { color: darken($white, 30%); cursor: default; display: block; float: $defaultFloat; font-size: ms(0) - 2px; height: $tabHeight; line-height: $tabHeight; padding: 0; padding-#{$defaultOpposite}: 9px; padding-#{$defaultFloat}: 20px; width: auto; text-transform: uppercase;
|
|
11
|
+
&:first-child { padding: 0; padding-#{$defaultOpposite}: 9px; }
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
dd { display: block; float:
|
|
14
|
+
dd { display: block; float: $defaultFloat; padding: 0; margin: 0;
|
|
15
15
|
a { color: lighten($txtColor, 30%); display: block; font-size: ms(0); height: $tabHeight; line-height: $tabHeight; padding: 0px ms(1) * 1.4;
|
|
16
16
|
&:focus { font-weight: bold; color: $mainColor; }
|
|
17
17
|
}
|
|
18
18
|
&.active { border-top: 3px solid $mainColor; margin-top: -3px;
|
|
19
|
-
a { cursor: default; color: lighten($txtColor, 10%); background: #fff; border
|
|
19
|
+
a { cursor: default; color: lighten($txtColor, 10%); background: #fff; border-#{$defaultFloat}: 1px solid darken($white, 10%); border-#{$defaultOpposite}: 1px solid darken($white, 10%); font-weight: bold; }
|
|
20
20
|
}
|
|
21
|
-
&:first-child { margin
|
|
21
|
+
&:first-child { margin-#{$defaultFloat}: 0; }
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&.vertical { height: auto; border-bottom: 1px solid darken($white, 10%);
|
|
25
25
|
dt, dd { float: none; height: auto; }
|
|
26
26
|
|
|
27
|
-
dd { border
|
|
27
|
+
dd { border-#{$defaultFloat}: 3px solid darken($white, 20%);
|
|
28
28
|
a { background: darken($white, 5%); border: none; border: 1px solid darken($white, 10%); border-width: 1px 1px 0 0; color: #555; display: block; font-size: ms(0); height: auto; line-height: 1; padding: 15px 20px; @include box-shadow(0 1px 0 $shinyEdge inset);
|
|
29
29
|
}
|
|
30
|
-
&.active { margin-top: 0; border-top: 1px solid lighten($black, 30%); border
|
|
30
|
+
&.active { margin-top: 0; border-top: 1px solid lighten($black, 30%); border-#{$defaultFloat}: 4px solid lighten($black, 10%);
|
|
31
31
|
a { background: lighten($black, 30%); border: none; color: #fff; height: auto; margin: 0; position: static; top: 0; @include box-shadow(0 0 0); }
|
|
32
32
|
}
|
|
33
33
|
&:first-child a.active { margin: 0; }
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&.pill { border-bottom: none; margin-bottom: 10px;
|
|
38
|
-
dd { margin
|
|
39
|
-
&:last-child { margin
|
|
38
|
+
dd { margin-#{$defaultOpposite}: 10px;
|
|
39
|
+
&:last-child { margin-#{$defaultOpposite}: 0; }
|
|
40
40
|
a { @include border-radius(1000px); background: darken($white, 10%); height: $tabHeight - 14; line-height: $tabHeight - 14; color: #666; }
|
|
41
41
|
|
|
42
42
|
&.active { border: none; margin-top: 0;
|
|
@@ -44,6 +44,9 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
&.contained { border-bottom: solid 1px #eee; margin-bottom: 0; }
|
|
47
|
+
&.two-up, &.three-up, &.four-up, &.five-up {
|
|
48
|
+
dd { margin-#{$defaultOpposite}: 0; }
|
|
49
|
+
}
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
&.two-up, &.three-up, &.four-up, &.five-up {
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
|
|
78
81
|
.tabs.mobile { border-bottom: solid 1px #ccc; height: auto;
|
|
79
82
|
|
|
80
|
-
dd a { padding: 18px 20px; border: none; border
|
|
83
|
+
dd a { padding: 18px 20px; border: none; border-#{$defaultFloat}: none; border-#{$defaultOpposite}: none; border-top: 1px solid #ccc; background: #fff; }
|
|
81
84
|
dd a.active { border: none; background: $mainColor; color: #fff; margin: 0; position: static; top: 0; height: auto; }
|
|
82
85
|
dd:first-child a.active { margin: 0; }
|
|
83
86
|
}
|
|
@@ -85,5 +88,5 @@
|
|
|
85
88
|
dl.contained.mobile { margin-bottom: 0; }
|
|
86
89
|
dl.contained.tabs.mobile dd a { padding: 18px 20px; }
|
|
87
90
|
|
|
88
|
-
dl.tabs.mobile + ul.contained { margin
|
|
91
|
+
dl.tabs.mobile + ul.contained { margin-#{$defaultFloat}: -20px; margin-#{$defaultOpposite}: -20px; border-width: 0 0 1px 0; }
|
|
89
92
|
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Foundation Top Bar
|
|
3
|
+
|
|
4
|
+
Requires:
|
|
5
|
+
-jquery.foundation.topbar.js
|
|
6
|
+
|
|
7
|
+
Notes:
|
|
8
|
+
- <nav class="top-bar"> can have .fixed added to make it stick to the top of viewport. Can add .contain-to-grid to top-bar to make it full width but content on grid.
|
|
9
|
+
- <li class="name"> creates a branding area that can be linked to homepage
|
|
10
|
+
- Can include text, image or both inside this <li>.
|
|
11
|
+
- <li class="divider"> creates a divider between nav items, add margins for space
|
|
12
|
+
- <li class="search"> Needs to hold a <form> which can use .row.collapse and pre/postfix buttons or default type="search"
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* <nav> */
|
|
16
|
+
.top-bar { background: $topBarBgColor; height: $topBarHeight; line-height: $topBarHeight; margin: 0 0 $topBarBtmMargin; padding: 0; width: 100%;
|
|
17
|
+
|
|
18
|
+
/* Contain width to .row width */
|
|
19
|
+
&.contain-to-grid { margin: 0 auto; position: relative; width: $rowWidth;
|
|
20
|
+
|
|
21
|
+
/* Get the black bar to extend all the way */
|
|
22
|
+
&:before, &:after { background: $topBarBgColor; content:""; display: block; height: $topBarHeight; position: absolute; width: 1000px; }
|
|
23
|
+
&:before { left: -100%; }
|
|
24
|
+
&:after { right: -100%; }
|
|
25
|
+
|
|
26
|
+
/* Contained and fixed at the top */
|
|
27
|
+
&.fixed { left: 50%; margin-left: -($rowWidth / 2); position: fixed; }
|
|
28
|
+
ul li.name h1 a { padding-left: $columnGutter / 2; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* First <ul> for branding, title, name, etc */
|
|
32
|
+
&>ul {
|
|
33
|
+
.name {
|
|
34
|
+
h1 { line-height: $topBarHeight; margin: 0;
|
|
35
|
+
a { font-weight: $topBarTitleWeight; padding: 0 $topBarHeight / 2; font-size: $topBarTitleSize !important; }
|
|
36
|
+
}
|
|
37
|
+
img { margin-top: -5px; vertical-align: middle; }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* topbar global <ul> styles */
|
|
42
|
+
ul { display: inline; height: $topBarHeight; line-height: $topBarHeight; list-style: none;
|
|
43
|
+
|
|
44
|
+
/* Main Navigation links style */
|
|
45
|
+
&>li { float: left;
|
|
46
|
+
a:not(.button) { color: $topBarLinkColor; display: block; font-size: $topBarLinkSize; font-weight: $topBarLinkWeight; height: $topBarHeight; line-height: $topBarHeight; padding: 0 $topBarHeight / 3; }
|
|
47
|
+
&:hover, &.active { background: darken($topBarBgColor, 20%);
|
|
48
|
+
a { color: darken($topBarLinkColor, 15%); }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Dividers between navigation */
|
|
52
|
+
&.divider { background: darken($topBarBgColor, 20%); @include box-shadow(1px 0 0 rgba(255,255,255,0.10)); height: 100%; margin-right: 1px; width: 1px; }
|
|
53
|
+
|
|
54
|
+
/* Put a button in an <li> but give is a class */
|
|
55
|
+
&.has-button {
|
|
56
|
+
a.button { margin: 0 $topBarHeight / 4; }
|
|
57
|
+
&:hover { background: $topBarBgColor;
|
|
58
|
+
a { color: #fff; }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Put a search bar or text input in the bar */
|
|
63
|
+
&.search { padding: 0 $topBarHeight / 3;
|
|
64
|
+
form { display: inline-block; margin-bottom: 0; vertical-align: middle; width: $topBarSearchWidth;
|
|
65
|
+
input[type=text] { @include border-right-radius(0); float: left; font-size: ms(0) - 1; margin-top: -1px; height: $topBarHeight / 2; //28px margin-bottom: 0; width: $topBarSearchWidth - 70px;
|
|
66
|
+
&+.button { border-left: none; @include border-left-radius(0); float: left; font-size: ms(0) - 2; margin-top: -1px; padding: 5px 12px 4px; }
|
|
67
|
+
}
|
|
68
|
+
input[type=search] { font-size: 16px; margin-bottom: 0; }
|
|
69
|
+
}
|
|
70
|
+
&:hover { background: $topBarBgColor; }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Hide the triangle for breakpoint menu */
|
|
74
|
+
&.toggle-topbar { display: none; }
|
|
75
|
+
|
|
76
|
+
/* li.has-dropdown */
|
|
77
|
+
&.has-dropdown { position: relative;
|
|
78
|
+
&:hover { &>.dropdown { display: block; visibility: visible; } }
|
|
79
|
+
a { padding-right: $topBarHeight * .75;
|
|
80
|
+
&:after { @include cssTriangle($topBarDropToggleSize, #fff, top); margin-right: $topBarHeight / 3; margin-top: -$topBarDropToggleSize / 2; position: absolute; right: 0; top: 50%; }
|
|
81
|
+
}
|
|
82
|
+
.dropdown { background: $topBarBgColor; left: 0; margin: 0; padding: $topBarHeight / 5 0 0 0; position: absolute; visibility: hidden; z-index: 99;
|
|
83
|
+
li { background: $topBarBgColor; line-height: 1; min-width: 100%; padding-bottom: 5px;
|
|
84
|
+
a { font-weight: normal; height: 100%; line-height: 1; padding: 5px $topBarHeight / 3 + 2 5px $topBarHeight / 3; white-space: nowrap;
|
|
85
|
+
&:after { border: none; }
|
|
86
|
+
&:hover { background: lighten($topBarBgColor, 10%); }
|
|
87
|
+
}
|
|
88
|
+
label { color: lighten($topBarBgColor, 30%); font-size: ms(0) - 4; font-weight: $topBarLinkWeight; margin: 0; padding-left: $topBarHeight / 3; text-transform: uppercase; }
|
|
89
|
+
&.divider { border-top: solid 1px darken($topBarBgColor, 20%); @include box-shadow(0 1px 0 rgba(255,255,255,.10) inset); height: 10px; padding: 0; width: 100%; }
|
|
90
|
+
&:last-child { padding-bottom: 10px; }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Dropdown Level 2+ */
|
|
95
|
+
.dropdown li.has-dropdown {
|
|
96
|
+
&>a { padding-right: $navBarHeight * .75;
|
|
97
|
+
&:after { border: none; content:"\00bb"; right: 5px; top: 6px; }
|
|
98
|
+
}
|
|
99
|
+
.dropdown { position: absolute; left: 100%; top: 0; }
|
|
100
|
+
&:hover {
|
|
101
|
+
&>.dropdown { display: block; }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Left Side <ul> */
|
|
108
|
+
&.left { float: left; width: auto; }
|
|
109
|
+
|
|
110
|
+
/* Right Side <ul> */
|
|
111
|
+
&.right { float: right; width: auto;
|
|
112
|
+
/* Dropdown Right Side Alignment */
|
|
113
|
+
.has-dropdown .dropdown { left: auto; right: -1px;
|
|
114
|
+
li.has-dropdown > .dropdown { right: 100%; left: auto; width: 100%; }
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Style for when you add 'fixed' as a class to .top-bar */
|
|
120
|
+
&.fixed { left: 0; position: fixed; top: 0; z-index: 99; }
|
|
121
|
+
|
|
122
|
+
.js-generated { display: none; }
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Firefox Fixes */
|
|
126
|
+
@-moz-document url-prefix() {
|
|
127
|
+
.top-bar ul li .button.small { padding-bottom: 6px; }
|
|
128
|
+
.top-bar ul li.search form input[type=search] { font-size: 14px; height: 22px; padding: 3px; }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* IE8 Fixes */
|
|
132
|
+
.lt-ie9 .top-bar ul li a { color: $topBarLinkColor; display: block; font-weight: $topBarLinkWeight; font-size: $topBarLinkSize; height: $topBarHeight; line-height: $topBarHeight; padding: 0 $topBarHeight / 3;
|
|
133
|
+
&.button { height: auto; line-height: 30px; margin-top: 7px; }
|
|
134
|
+
&:hover { color: darken($topBarLinkColor, 20%); }
|
|
135
|
+
img { margin-top: -5px; vertical-align: middle; }
|
|
136
|
+
&.active { background: darken($topBarBgColor, 5%); color: darken($topBarLinkColor, 15%); }
|
|
137
|
+
}
|
|
138
|
+
.lt-ie9 .top-bar ul li.has-dropdown {
|
|
139
|
+
padding-right: $topBarHeight * .75;
|
|
140
|
+
&>ul li { padding-right: 0; }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Mobile Styles */
|
|
144
|
+
@media only screen and (max-width: $topBarBreakPoint) {
|
|
145
|
+
|
|
146
|
+
.top-bar { margin-bottom: 0; overflow: hidden;
|
|
147
|
+
.js-generated { display: block; }
|
|
148
|
+
|
|
149
|
+
/* Override contain to grid stuff for breakpoint */
|
|
150
|
+
&.contain-to-grid { margin: 0 auto; width: auto;
|
|
151
|
+
&:before, &:after { display: none; }
|
|
152
|
+
&.fixed { left: auto; margin-left: auto; position: static; }
|
|
153
|
+
}
|
|
154
|
+
&.fixed.expanded { height: auto; }
|
|
155
|
+
|
|
156
|
+
/* Setting up the sliding area */
|
|
157
|
+
section { left: 0; position: relative; width: auto; @include single-transition(left, 300ms); }
|
|
158
|
+
|
|
159
|
+
ul { width: 100%; min-height: 100%; height: 100%; margin-bottom: 0; display: block;
|
|
160
|
+
li { float: none;
|
|
161
|
+
&.active, &:hover { background: darken($topBarBgColor, 5%); }
|
|
162
|
+
|
|
163
|
+
/* Branding and name */
|
|
164
|
+
&.name { background: darken($topBarBgColor, 20%);
|
|
165
|
+
h1 { line-height: 1; }
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Dropdown Toggle */
|
|
169
|
+
&.toggle-topbar { cursor: pointer; display: block; height: $topBarHeight; position: absolute; right: 0; top: 0; width: 50%;
|
|
170
|
+
a { @include cssTriangle($topBarNavToggleSize, #fff, top); padding: 0; position: absolute; top: 50%; right: $topBarHeight / 2; margin-top: -($topBarNavToggleSize / 2); }
|
|
171
|
+
@if $topBarBreakPoint == 9999px { a { right: ($topBarHeight / 2) + ($columnGutter / 2);} }
|
|
172
|
+
&:hover {background: darken($topBarBgColor, 20%); }
|
|
173
|
+
}
|
|
174
|
+
&.toggle-topbar a { padding: 0 !important; }
|
|
175
|
+
|
|
176
|
+
/* Divider for breakpoint */
|
|
177
|
+
&.divider { border-bottom: solid 1px rgba(255,255,255,0.2); border-top: solid 1px darken($topBarBgColor, 15%); clear: both; height: 1px !important; margin: 8px 0 !important; width: 100%; }
|
|
178
|
+
|
|
179
|
+
/* Search Overrides for breakpoint size */
|
|
180
|
+
&.search { padding: 0 $topBarHeight / 2;
|
|
181
|
+
form { width: 100%;
|
|
182
|
+
input[type=text] { width: 75%; }
|
|
183
|
+
.button { top: 0; width: 25%; }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Dropdown Level 1 */
|
|
188
|
+
&.has-dropdown {
|
|
189
|
+
a { padding-right: $topBarHeight * .75;
|
|
190
|
+
&:after { @include cssTriangle($topBarDropToggleSize, rgba(255,255,255,0.5), left); margin-right: $topBarHeight / 3; margin-top: -($topBarDropToggleSize / 2) - 2; position: absolute; top: 50%; }
|
|
191
|
+
}
|
|
192
|
+
&:hover >.dropdown { display: block; visibility: hidden; }
|
|
193
|
+
.dropdown { visibility: hidden; z-index: 0 !important; }
|
|
194
|
+
&.moved { position: static;
|
|
195
|
+
.dropdown { top: 0; visibility: visible;
|
|
196
|
+
li {
|
|
197
|
+
label { margin-bottom: 6px; padding-top: 6px !important; font-size: ms(0) - 3; }
|
|
198
|
+
&:not(.title) { padding-bottom: 0;
|
|
199
|
+
a { padding: 8px $topBarHeight / 2; font-size: ms(0); }
|
|
200
|
+
}
|
|
201
|
+
a, label { padding: 0 $topBarHeight / 2; }
|
|
202
|
+
a:hover { background: transparent; display: block; }
|
|
203
|
+
&.divider { border-bottom: solid 1px rgba(255,255,255,0.1); margin-top: 8px !important; margin-bottom: 8px !important; }
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
.back.title { padding-bottom: 0;
|
|
207
|
+
a:before { position: absolute; top: 50%; left: ($topBarHeight / 2) - $topBarDropToggleSize; margin-top: -$topBarDropToggleSize; width: 0; height: 0; @include cssTriangle($topBarDropToggleSize, #fff, right); }
|
|
208
|
+
h5 { margin: 0; padding-left: $topBarDropToggleSize * 3; position: relative;
|
|
209
|
+
a { padding-top: 8px; padding-bottom: 8px; font-size: ms(2); font-weight: $topBarTitleWeight; }
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Dropdown Level 2 */
|
|
216
|
+
&.has-dropdown .dropdown li { background: transparent;
|
|
217
|
+
&.has-dropdown {
|
|
218
|
+
.dropdown { left: 100% !important; top: 0; right: auto !important; }
|
|
219
|
+
&>a { padding-right: $topBarHeight * .75;
|
|
220
|
+
&:after { content: ""; margin-right: $topBarHeight / 3; @include cssTriangle($topBarDropToggleSize, rgba(255,255,255,0.5), left); position: absolute; top: 50%; margin-top: -($topBarDropToggleSize / 2) - 2; }
|
|
221
|
+
}
|
|
222
|
+
&.moved { position: static;
|
|
223
|
+
.dropdown { top: 0; visibility: visible; }
|
|
224
|
+
}
|
|
225
|
+
&:hover { display: block; }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
&.left, &.right { float: none; width: 100%;
|
|
230
|
+
&>li { display: block; float: none; margin: 0 !important;
|
|
231
|
+
&.has-dropdown {
|
|
232
|
+
.dropdown { left: 100% !important; top: 0; right: auto !important; }
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
section > ul li a:not(.button) { padding-left: $topBarHeight / 2 !important; }
|
|
238
|
+
|
|
239
|
+
/* When the Small Nav is Showing */
|
|
240
|
+
&.expanded { height: 100%;
|
|
241
|
+
ul li.toggle-topbar a { @include cssTriangle($topBarNavToggleSize, rgba(255,255,255,0.5), bottom); top: auto; bottom: 50%; margin-bottom: -($topBarNavToggleSize / 2); }
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
.top-bar ul li.has-button { padding: 0 $navBarHeight / 2 5px; }
|
|
245
|
+
.top-bar ul li .button.small { margin: 0 !important; display: inline-block; width: 100%; }
|
|
246
|
+
}
|