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.
Files changed (41) hide show
  1. data/lib/foundation/version.rb +1 -1
  2. data/scss/foundation/_settings.scss +40 -1
  3. data/scss/foundation/common/_forms.scss +15 -15
  4. data/scss/foundation/common/_globals.scss +6 -2
  5. data/scss/foundation/common/_typography.scss +7 -5
  6. data/scss/foundation/components/_grid.scss +20 -20
  7. data/scss/foundation/components/modules/_all.scss +1 -0
  8. data/scss/foundation/components/modules/_buttons.scss +33 -33
  9. data/scss/foundation/components/modules/_navbar.scss +26 -23
  10. data/scss/foundation/components/modules/_orbit.scss +24 -24
  11. data/scss/foundation/components/modules/_reveal.scss +10 -10
  12. data/scss/foundation/components/modules/_tabs.scss +16 -13
  13. data/scss/foundation/components/modules/_topbar.scss +246 -0
  14. data/scss/foundation/components/modules/_ui.scss +57 -29
  15. data/scss/foundation/mixins/_css-triangle.scss +1 -1
  16. data/templates/project/scss/_settings.scss +32 -2
  17. data/templates/project/scss/app.scss +1 -0
  18. data/test/buttons.html +18 -8
  19. data/test/elements.html +62 -18
  20. data/test/forms.html +25 -49
  21. data/test/index.html +1 -0
  22. data/test/navigation.html +1 -1
  23. data/test/reveal.html +24 -7
  24. data/test/scss/_settings.scss +142 -74
  25. data/test/tabs.html +1 -1
  26. data/test/topbar.html +188 -0
  27. data/vendor/assets/javascripts/foundation/app.js +33 -21
  28. data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +6 -4
  29. data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +6 -5
  30. data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +13 -7
  31. data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +5 -4
  32. data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +8 -6
  33. data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +3 -2
  34. data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +208 -6
  35. data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +5 -6
  36. data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +3 -2
  37. data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +13 -7
  38. data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +139 -0
  39. data/vendor/assets/javascripts/foundation/jquery.js +3416 -3519
  40. data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +2 -2
  41. metadata +10 -9
@@ -1,3 +1,3 @@
1
1
  module Foundation
2
- VERSION = "3.0.9"
2
+ VERSION = "3.1.0.rc1"
3
3
  end
@@ -7,6 +7,20 @@ $columnGutter: 30px !default;
7
7
  $totalColumns: 12 !default;
8
8
  $mobileTotalColumns: 4 !default;
9
9
 
10
+ // Text Direction Settings
11
+
12
+ $textDirection: ltr !default; // Controls default global text direction, 'rtl' or 'ltr'
13
+ $defaultFloat: left !default; // Change this to 'right' for right-to-left languages
14
+ $defaultOpposite: right !default; // Change this to 'left' for right-to-left languages
15
+
16
+ @if $textDirection == ltr {
17
+ $defaultFloat: left;
18
+ $defaultOpposite: right;
19
+ } @else {
20
+ $defaultFloat: right;
21
+ $defaultOpposite: left;
22
+ }
23
+
10
24
  // Colors Settings
11
25
 
12
26
  $mainColor: #2ba6cb !default;
@@ -21,12 +35,13 @@ $shinyEdge: rgba(#fff, .5) !default;
21
35
  $darkEdge: rgba(#000, .2) !default;
22
36
 
23
37
  // Font Settings
38
+
24
39
  $headerFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default;
25
40
  $headerFontWeight: bold !default;
26
41
  $headerFontColor: #222 !default;
27
42
  $bodyFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default;
28
43
  $bodyFontWeight: normal !default;
29
- $bodyFontColor: #222 !default;
44
+ $bodyFontColor: $txtColor !default;
30
45
 
31
46
  // Button Settings
32
47
 
@@ -50,6 +65,15 @@ $tabHeight: 40px !default;
50
65
  $navBarHeight: 40px !default;
51
66
  $navFlyoutBaseWidth: 250px !default;
52
67
 
68
+ // UI Settings
69
+
70
+ $thumbRadius: 3px !default;
71
+
72
+ $progBarHeight: 25px !default;
73
+ $progBarBorderColor: darken($white, 20%) !default;
74
+ $progBarBorderSize: 1px !default;
75
+ $progBarPad: 2px !default;
76
+
53
77
  // Off Canvas Width Settings
54
78
 
55
79
  $mainWidth: 80% !default;
@@ -82,6 +106,21 @@ $tapToCloseFontColor: #888 !default;
82
106
  $tooltipFontSizeScreenSmall: 14 !default;
83
107
  $tooltipBackgroundOpacityScreenSmall: 0.85 !default;
84
108
 
109
+ // Top Bar Settings
110
+
111
+ $topBarBgColor: #222 !default;
112
+ $topBarHeight: 45px !default;
113
+ $topBarBtmMargin: 30px !default;
114
+ $topBarTitleWeight: bold !default;
115
+ $topBarTitleSize: ms(1) !default;
116
+ $topBarLinkColor: #fff !default;
117
+ $topBarLinkWeight: bold !default;
118
+ $topBarLinkSize: ms(0) - 1 !default;
119
+ $topBarDropToggleSize: 5px !default;
120
+ $topBarSearchWidth: 200px !default;
121
+ $topBarBreakPoint: 940px !default; // Change to 9999px for always mobile layout
122
+ $topBarNavToggleSize: 8px !default;
123
+
85
124
  // Media Queries
86
125
 
87
126
  $screenSmall: 768px !default;
@@ -25,13 +25,13 @@
25
25
  }
26
26
 
27
27
  .prefix, .postfix { display: block; position: relative; z-index: 2; text-align: center; width: 100%; padding-top: 0; padding-bottom: 0; height: (ms(0) + ($formSpacing * 1.5)); line-height: (ms(0) + ($formSpacing * 1.5)) - 1; }
28
- a.button.prefix, a.button.postfix { padding-left: 0; padding-right: 0; text-align: center; }
28
+ a.button.prefix, a.button.postfix { padding-#{$defaultFloat}: 0; padding-#{$defaultOpposite}: 0; text-align: center; }
29
29
  span.prefix, span.postfix { background: darken($white, 5%); border: 1px solid darken($white, 20%); }
30
30
 
31
- .prefix { left: 2px; @include border-corner-radius(top, left, 2px); @include border-corner-radius(bottom, left, 2px); }
32
- .postfix { right: 2px; @include border-corner-radius(top, right, 2px); @include border-corner-radius(bottom, right, 2px); }
31
+ .prefix { #{$defaultFloat}: 2px; @include border-corner-radius(top, $defaultFloat, 2px); @include border-corner-radius(bottom, $defaultFloat, 2px); overflow:hidden; }
32
+ .postfix { #{$defaultOpposite}: 2px; @include border-corner-radius(top, $defaultOpposite, 2px); @include border-corner-radius(bottom, $defaultOpposite, 2px); }
33
33
 
34
- input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], textarea { border: 1px solid darken($white, 20%); @include border-radius(2px); @include box-shadow(inset 0 1px 2px rgba(0,0,0,0.1)); color: rgba(0,0,0,0.75); display: block; font-size: ms(0); margin: 0 0 $formSpacing 0; padding: ($formSpacing / 2); height: (ms(0) + ($formSpacing * 1.5)); width: 100%; @include transition(all 0.15s linear);
34
+ input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], textarea { font-family: $bodyFontFamily; border: 1px solid darken($white, 20%); @include border-radius(2px); @include box-shadow(inset 0 1px 2px rgba(0,0,0,0.1)); color: rgba(0,0,0,0.75); display: block; font-size: ms(0); margin: 0 0 $formSpacing 0; padding: ($formSpacing / 2); height: (ms(0) + ($formSpacing * 1.5)); width: 100%; @include transition(all 0.15s linear);
35
35
 
36
36
  &.oversize { font-size: ms(1); padding: (($formSpacing - 4) / 2) ($formSpacing / 2); }
37
37
 
@@ -46,13 +46,13 @@
46
46
  /* Fieldsets */
47
47
  fieldset { border: solid 1px #ddd; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; padding: 12px 12px 0; margin: 18px 0;
48
48
 
49
- legend { font-weight: bold; background: $white; padding: 0 3px; margin: 0 0 0 -3px; }
49
+ legend { font-weight: bold; background: $white; padding: 0 3px; margin: 0; margin-#{$defaultFloat}: -3px; }
50
50
  }
51
51
 
52
52
  /* Errors */
53
53
  .error input, input.error, .error textarea, textarea.error { border-color: $alertColor; background-color: rgba($alertColor, 0.1); }
54
54
  .error label, label.error { color: $alertColor; }
55
- .error small, small.error { display: block; padding: 6px 4px; margin-top: -($formSpacing) - 1; margin-bottom: $formSpacing; background: $alertColor; color: #fff; @include font-size(12); font-weight: bold; @include border-bottom-left-radius(2px); @include border-bottom-right-radius(2px); }
55
+ .error small, small.error { display: block; padding: 6px 4px; margin-top: -($formSpacing) - 1; margin-bottom: $formSpacing; background: $alertColor; color: #fff; @include font-size(12); font-weight: bold; @include border-corner-radius(bottom, $defaultFloat, 2px); @include border-corner-radius(bottom, $defaultOpposite, 2px); }
56
56
 
57
57
  @media only screen and (max-width: $screenSmall - 1) {
58
58
  @for $i from 1 through $totalColumns {
@@ -68,10 +68,10 @@
68
68
 
69
69
  &.radio { @include border-radius(100px); }
70
70
  &.checkbox {
71
- &:before { content: ""; display: block; line-height: 0.8; height: 14px; width: 14px; text-align: center; position: absolute; top: 0; left: 0; font-size: 14px; color: #fff; }
71
+ &:before { content: ""; display: block; line-height: 0.8; height: 14px; width: 14px; text-align: center; position: absolute; top: 0; #{$defaultFloat}: 0; font-size: 14px; color: #fff; }
72
72
  }
73
73
  &.radio.checked {
74
- &:before { content: ""; display: block; width: 8px; height: 8px; @include border-radius(100px); background: #222; position: relative; top: 3px; left: 3px; }
74
+ &:before { content: ""; display: block; width: 8px; height: 8px; @include border-radius(100px); background: #222; position: relative; top: 3px; #{$defaultFloat}: 3px; }
75
75
  }
76
76
  &.checkbox.checked {
77
77
  &:before { content: "\00d7"; color: #222; }
@@ -79,9 +79,9 @@
79
79
  }
80
80
  div.custom.dropdown { display: block; position: relative; width: auto; height: 28px; margin-bottom: 9px; margin-top: 2px;
81
81
 
82
- a.current { display: block; width: auto; line-height: 26px; min-height: 28px; padding: 0 38px 0 6px; border: solid 1px #ddd; color: #141414; background-color: #fff; white-space: nowrap; }
83
- a.selector { position: absolute; width: 27px; height: 28px; display: block; right: 0; top: 0; border: solid 1px #ddd;
84
- &:after { content: ""; display: block; @include cssTriangle(5px, #aaa, top); position: absolute; left: 50%; top: 50%; margin-top: -2px; margin-left: -5px; }
82
+ a.current { display: block; width: auto; line-height: 26px; min-height: 28px; padding: 0; padding-#{$defaultFloat}: 6px; padding-#{$defaultOpposite}: 38px; border: solid 1px #ddd; color: #141414; background-color: #fff; white-space: nowrap; }
83
+ a.selector { position: absolute; width: 27px; height: 28px; display: block; #{$defaultOpposite}: 0; top: 0; border: solid 1px #ddd;
84
+ &:after { content: ""; display: block; @include cssTriangle(5px, #aaa, top); position: absolute; #{$defaultFloat}: 50%; top: 50%; margin-top: -2px; margin-#{$defaultFloat}: -5px; }
85
85
  }
86
86
  &:hover, &.open {
87
87
  a.selector { &:after { @include cssTriangle(5px, #222, top); } }
@@ -100,14 +100,14 @@
100
100
  &.open.expand ul { width: 100% !important; }
101
101
  }
102
102
 
103
- div.custom.dropdown ul { position: absolute; width: auto; display: none; margin: 0; left: 0; top: 27px; margin: 0; padding: 0; background: #fff; background: rgba(#fff,0.95); border: solid 1px darken($white, 20%);
103
+ div.custom.dropdown ul { position: absolute; width: auto; display: none; margin: 0; #{$defaultFloat}: 0; top: 27px; margin: 0; padding: 0; background: #fff; background: rgba(#fff,0.95); border: solid 1px darken($white, 20%);
104
104
 
105
- li { color: #555; font-size: ms(0) - 1; cursor: pointer; padding: 3px 38px 3px 6px; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none; }
105
+ li { color: #555; font-size: ms(0) - 1; cursor: pointer; padding: 3px; padding-#{$defaultFloat}: 6px; padding-#{$defaultOpposite}: 38px; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none; }
106
106
  li.selected { background: lighten($mainColor, 40%); color: #000;
107
- &:after { content: "\2013"; position: absolute; right: 10px; }
107
+ &:after { content: "\2013"; position: absolute; #{$defaultOpposite}: 10px; }
108
108
  }
109
109
  li:hover { background-color: lighten($mainColor, 45%); color: #222;
110
- &:after { content: "\2013"; position: absolute; right: 10px; color: lighten($mainColor, 25%); }
110
+ &:after { content: "\2013"; position: absolute; #{$defaultOpposite}: 10px; color: lighten($mainColor, 25%); }
111
111
  }
112
112
  li.selected:hover { background: lighten($mainColor, 40%); cursor: default; color: #000;
113
113
  &:after { color: #000; }
@@ -15,8 +15,12 @@
15
15
 
16
16
  /* Misc ---------------------- */
17
17
 
18
- .left { float: left; }
19
- .right { float: right; }
18
+ .left { float: left;
19
+ @include respondTo(smallScreen) { float: none; }
20
+ }
21
+ .right { float: right;
22
+ @include respondTo(smallScreen) { float: none; }
23
+ }
20
24
  .text-left { text-align: left; }
21
25
  .text-right { text-align: right; }
22
26
  .text-center { text-align: center; }
@@ -1,9 +1,10 @@
1
1
  /* Base Type Styles Using Modular Scale ---------------------- */
2
2
 
3
- body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,p,blockquote,th,td {
3
+ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td {
4
4
  margin:0;
5
5
  padding:0;
6
6
  font-size: ms(0);
7
+ direction: $textDirection;
7
8
  }
8
9
 
9
10
  p { font-family: $bodyFontFamily; font-weight: $bodyFontWeight; font-size: ms(0); line-height: 1.6; margin-bottom: ms(1);
@@ -14,6 +15,7 @@
14
15
  h1, h2, h3, h4, h5, h6 {
15
16
  font-family: $headerFontFamily;
16
17
  font-weight: $headerFontWeight;
18
+ color: $headerFontColor;
17
19
  text-rendering: optimizeLegibility;
18
20
  line-height: 1.1;
19
21
  margin-bottom: ms(0);
@@ -41,9 +43,9 @@
41
43
  ul, ol { font-size: ms(0); line-height: 1.6; margin-bottom: ms(1); list-style-position: inside; }
42
44
  ul {
43
45
  li {
44
- ul, ol { margin-left: 20px; margin-bottom: 0; }
46
+ ul, ol { margin-#{$defaultFloat}: 20px; margin-bottom: 0; }
45
47
  }
46
- &.square, &.circle, &.disc { margin-left: ms(1); }
48
+ &.square, &.circle, &.disc { margin-#{$defaultFloat}: ms(1); }
47
49
  &.square { list-style-type: square;
48
50
  li ul { list-style: inherit; }
49
51
  }
@@ -58,13 +60,13 @@
58
60
  }
59
61
  ol {
60
62
  li {
61
- ul, ol { margin-left: 20px; margin-bottom: 0; }
63
+ ul, ol { margin-#{$defaultFloat}: 20px; margin-bottom: 0; }
62
64
  }
63
65
  }
64
66
 
65
67
  /* Blockquotes ---------------------- */
66
68
  blockquote, blockquote p { line-height: 1.5; color: lighten($headerFontColor, 30%); }
67
- blockquote { margin: 0 0 ms(1); padding: 9px 20px 0 19px; border-left: 1px solid #ddd;
69
+ blockquote { margin: 0 0 ms(1); padding: 9px 20px 0 19px; border-#{$defaultFloat}: 1px solid #ddd;
68
70
  cite { display: block; font-size: ms(0) - 1; color: lighten($headerFontColor, 20%);
69
71
  &:before { content: "\2014 \0020"; }
70
72
  a, a:visited { color: lighten($headerFontColor, 20%); }
@@ -11,12 +11,12 @@
11
11
  }
12
12
  }
13
13
 
14
- .column, .columns { float: left; min-height: 1px; padding: 0 ($columnGutter/2); position: relative;
14
+ .column, .columns { float: $defaultFloat; min-height: 1px; padding: 0 ($columnGutter/2); position: relative;
15
15
  &.centered { float: none; margin: 0 auto; }
16
16
  }
17
17
 
18
- [class*="column"] + [class*="column"]:last-child { float: right; }
19
- [class*="column"] + [class*="column"].end { float: left; }
18
+ [class*="column"] + [class*="column"]:last-child { float: $defaultOpposite; }
19
+ [class*="column"] + [class*="column"].end { float: $defaultFloat; }
20
20
 
21
21
  // Creating column classes
22
22
  @for $i from 1 through $totalColumns {
@@ -33,14 +33,14 @@
33
33
  // Creating .row .offset-by-# classes
34
34
  @for $i from 1 through $totalColumns - 2 {
35
35
  .row {
36
- .offset-by-#{convert-number-to-word($i)} { margin-left: gridCalc($i, $totalColumns); }
36
+ .offset-by-#{convert-number-to-word($i)} { margin-#{$defaultFloat}: gridCalc($i, $totalColumns); }
37
37
  }
38
38
  }
39
39
 
40
40
  // Creating .row .push-# classes
41
41
  @for $i from 2 through $totalColumns - 2 {
42
- .push-#{convert-number-to-word($i)} { left: gridCalc($i, $totalColumns); }
43
- .pull-#{convert-number-to-word($i)} { right: gridCalc($i, $totalColumns); }
42
+ .push-#{convert-number-to-word($i)} { #{$defaultFloat}: gridCalc($i, $totalColumns); }
43
+ .pull-#{convert-number-to-word($i)} { #{$defaultOpposite}: gridCalc($i, $totalColumns); }
44
44
  }
45
45
 
46
46
  img, object, embed { max-width: 100%; height: auto; }
@@ -54,9 +54,9 @@
54
54
  /* Mobile Grid and Overrides ---------------------- */
55
55
 
56
56
  @media only screen and (max-width: $screenSmall - 1) {
57
- body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
57
+ body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; margin-#{$defaultFloat}: 0; margin-#{$defaultOpposite}: 0; padding-#{$defaultFloat}: 0; padding-#{$defaultOpposite}: 0; }
58
58
 
59
- .row { width: auto; min-width: 0; margin-left: 0; margin-right: 0; }
59
+ .row { width: auto; min-width: 0; margin-#{$defaultFloat}: 0; margin-#{$defaultOpposite}: 0; }
60
60
  .column, .columns { width: auto !important; float: none; }
61
61
  .column:last-child, .columns:last-child { float: none; }
62
62
  [class*="column"] + [class*="column"]:last-child { float: none; }
@@ -64,23 +64,23 @@
64
64
  .column:after, .columns:after { clear: both; }
65
65
 
66
66
  // Placeholder classes for mobile grid overrides
67
- %no-left-margin { margin-left: 0 !important; }
68
- %left-auto { left: auto; }
69
- %right-auto { right: auto; }
67
+ %no-default-margin { margin-#{$defaultFloat}: 0 !important; }
68
+ %default-auto { #{$defaultFloat}: auto; }
69
+ %opposite-auto { #{$defaultOpposite}: auto; }
70
70
 
71
71
  @for $i from 1 through $totalColumns - 2 {
72
- .offset-by-#{convert-number-to-word($i)} { @extend %no-left-margin; }
72
+ .offset-by-#{convert-number-to-word($i)} { @extend %no-default-margin; }
73
73
  }
74
74
  @for $i from 2 through $totalColumns - 2 {
75
- .push-#{convert-number-to-word($i)} { @extend %left-auto; }
76
- .pull-#{convert-number-to-word($i)} { @extend %right-auto; }
75
+ .push-#{convert-number-to-word($i)} { @extend %default-auto; }
76
+ .pull-#{convert-number-to-word($i)} { @extend %opposite-auto; }
77
77
  }
78
78
 
79
79
  /* Mobile 4-column Grid */
80
80
  @for $i from 1 through $mobileTotalColumns {
81
81
  .row {
82
- .mobile-#{convert-number-to-word($i)} { width: gridCalc($i, $mobileTotalColumns) !important; float: left; padding: 0 ($columnGutter/2);
83
- &:last-child { float: right; }
82
+ .mobile-#{convert-number-to-word($i)} { width: gridCalc($i, $mobileTotalColumns) !important; float: $defaultFloat; padding: 0 ($columnGutter/2);
83
+ &:last-child { float: $defaultOpposite; }
84
84
  }
85
85
  &.collapse {
86
86
  .mobile-#{convert-number-to-word($i)} { padding: 0; }
@@ -88,8 +88,8 @@
88
88
  }
89
89
  }
90
90
  @for $i from 1 through $mobileTotalColumns - 1 {
91
- .push-#{convert-number-to-word($i)}-mobile { left: gridCalc($i, $mobileTotalColumns); }
92
- .pull-#{convert-number-to-word($i)}-mobile { right: gridCalc($i, $mobileTotalColumns); }
91
+ .push-#{convert-number-to-word($i)}-mobile { #{$defaultFloat}: gridCalc($i, $mobileTotalColumns); }
92
+ .pull-#{convert-number-to-word($i)}-mobile { #{$defaultOpposite}: gridCalc($i, $mobileTotalColumns); }
93
93
  }
94
94
  }
95
95
 
@@ -108,7 +108,7 @@ that IE7/8 do not support :nth-child.
108
108
 
109
109
  .block-grid { display: block; overflow: hidden; padding: 0;
110
110
 
111
- &>li { display: block; height: auto; float: left; }
111
+ &>li { display: block; height: auto; float: $defaultFloat; }
112
112
  &.one-up { margin: 0;
113
113
  &>li { width: 100%; padding: 0 0 15px; }
114
114
  }
@@ -141,7 +141,7 @@ that IE7/8 do not support :nth-child.
141
141
  /* Mobile Block Grids */
142
142
  @media only screen and (max-width: $screenSmall - 1) {
143
143
  .block-grid.mobile {
144
- &>li { float: none; width: 100%; margin-left: 0; }
144
+ &>li { float: none; width: 100%; margin-#{$defaultFloat}: 0; }
145
145
  }
146
146
 
147
147
  .block-grid {
@@ -1,5 +1,6 @@
1
1
  @import "buttons";
2
2
  @import "navbar";
3
+ @import "topbar";
3
4
  // @import "offcanvas";
4
5
  @import "orbit";
5
6
  @import "reveal";
@@ -40,7 +40,7 @@
40
40
  &.round { @include border-radius(1000px); }
41
41
 
42
42
  /* Layout */
43
- &.full-width { width: 100%; text-align: center; padding-left: 0px !important; padding-right: 0px !important; }
43
+ &.full-width { width: 100%; text-align: center; padding-#{$defaultFloat}: 0px !important; padding-#{$defaultOpposite}: 0px !important; }
44
44
  &.left-align { text-align: left; text-indent: 12px; }
45
45
 
46
46
  /* Disabled ---------- */
@@ -64,7 +64,7 @@
64
64
 
65
65
  @media only screen and (max-width: $screenSmall - 1) {
66
66
  .button { display: block; }
67
- button.button, input[type="submit"].button { width: 100%; padding-left: 0; padding-right: 0; }
67
+ button.button, input[type="submit"].button { width: 100%; padding-#{$defaultFloat}: 0; padding-#{$defaultOpposite}: 0; }
68
68
  }
69
69
 
70
70
  /* Correct FF button padding */
@@ -78,24 +78,24 @@
78
78
 
79
79
  /* Buttons with Dropdowns ---------------------- */
80
80
 
81
- .button.dropdown { position: relative; padding-right: (($btnBase + 12) * 2);
81
+ .button.dropdown { position: relative; padding-#{$defaultOpposite}: (($btnBase + 12) * 2);
82
82
 
83
83
  /* Sizes */
84
- &.large { padding-right: ($largeBtnBase * 2) * 2; }
85
- &.small { padding-right: ($smallBtnBase * 2) * 2; }
86
- &.tiny { padding-right: ($tinyBtnBase * 2) * 2; }
84
+ &.large { padding-#{$defaultOpposite}: ($largeBtnBase * 2) * 2; }
85
+ &.small { padding-#{$defaultOpposite}: ($smallBtnBase * 2) * 2; }
86
+ &.tiny { padding-#{$defaultOpposite}: ($tinyBtnBase * 2) * 2; }
87
87
 
88
88
  /* Triangles */
89
- &:after { @include cssTriangle(6px, #fff, top); position: absolute; top: 50%; right: $btnBase * 2; margin-top: -2px; }
90
- &.large:after { @include cssTriangle(7px, #fff, top); margin-top: -3px; right: $largeBtnBase * 2; }
91
- &.small:after { @include cssTriangle(5px, #fff, top); margin-top: -2px; right: $smallBtnBase * 2; }
92
- &.tiny:after { @include cssTriangle(4px, #fff, top); margin-top: -1px; right: $tinyBtnBase * 2; }
89
+ &:after { @include cssTriangle(6px, #fff, top); position: absolute; top: 50%; #{$defaultOpposite}: $btnBase * 2; margin-top: -2px; }
90
+ &.large:after { @include cssTriangle(7px, #fff, top); margin-top: -3px; #{$defaultOpposite}: $largeBtnBase * 2; }
91
+ &.small:after { @include cssTriangle(5px, #fff, top); margin-top: -2px; #{$defaultOpposite}: $smallBtnBase * 2; }
92
+ &.tiny:after { @include cssTriangle(4px, #fff, top); margin-top: -1px; #{$defaultOpposite}: $tinyBtnBase * 2; }
93
93
 
94
94
  /* Flyout List */
95
- &>ul { @include box-sizing(content-box); display: none; position: absolute; left: -1px; background: #fff; background: rgba(#fff,0.95); list-style: none; margin: 0; padding: 0; border: 1px solid darken($white, 20%); border-top: none; min-width: 100%; z-index: 40;
95
+ &>ul { @include box-sizing(content-box); display: none; position: absolute; #{$defaultFloat}: -1px; background: #fff; background: rgba(#fff,0.95); list-style: none; margin: 0; padding: 0; border: 1px solid darken($white, 20%); border-top: none; min-width: 100%; z-index: 40;
96
96
 
97
97
  li { width: 100%; cursor: pointer; padding: 0; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none;
98
- a { display: block; color: #555; font-size: ms(0) - 1; font-weight: $bodyFontWeight; padding: 6px 14px; text-align: left; }
98
+ a { display: block; color: #555; font-size: ms(0) - 1; font-weight: $bodyFontWeight; padding: 6px 14px; text-align: $defaultFloat; }
99
99
  &:hover { background-color: lighten($mainColor, 45%); color: #222; }
100
100
  &.divider { min-height: 0; padding: 0; height: 1px; margin: 4px 0; background: darken($white, 7%); }
101
101
  }
@@ -120,17 +120,17 @@
120
120
  &.secondary:hover { background-color: $secondaryColor; }
121
121
 
122
122
  /* Sizes */
123
- &>a { color: $white; display: block; padding: $btnBase (($btnBase * 2.5) * 2) ($btnBase + 1) ($btnBase * 2); @include single-transition(background-color, .15s, ease-in-out);
123
+ &>a { color: $white; display: block; padding: $btnBase (($btnBase * 2.5) * 2) ($btnBase + 1) ($btnBase * 2); padding-#{$defaultFloat}: $btnBase * 2; padding-#{$defaultOpposite}: ($btnBase * 2.5) * 2; @include single-transition(background-color, .15s, ease-in-out);
124
124
  &:hover { background-color: darken($mainColor, 10%); }
125
125
  }
126
- &.large>a { padding: $largeBtnBase (($largeBtnBase * 2.5) * 2) ($largeBtnBase + 1) ($largeBtnBase * 2); }
127
- &.small>a { padding: $smallBtnBase (($smallBtnBase * 2.5) * 2) ($smallBtnBase + 1) ($smallBtnBase * 2); }
128
- &.tiny>a { padding: $tinyBtnBase (($tinyBtnBase * 2.5) * 2) ($tinyBtnBase + 1) ($tinyBtnBase * 2); }
126
+ &.large>a { padding: $largeBtnBase (($largeBtnBase * 2.5) * 2) ($largeBtnBase + 1) ($largeBtnBase * 2); padding-#{$defaultFloat}: $largeBtnBase * 2; padding-#{$defaultOpposite}: ($largeBtnBase * 2.5) * 2; }
127
+ &.small>a { padding: $smallBtnBase (($smallBtnBase * 2.5) * 2) ($smallBtnBase + 1) ($smallBtnBase * 2); padding-#{$defaultFloat}: $smallBtnBase * 2; padding-#{$defaultOpposite}: ($smallBtnBase * 2.5) * 2; }
128
+ &.tiny>a { padding: $tinyBtnBase (($tinyBtnBase * 2.5) * 2) ($tinyBtnBase + 1) ($tinyBtnBase * 2); padding-#{$defaultFloat}: $tinyBtnBase * 2; padding-#{$defaultOpposite}: ($tinyBtnBase * 2.5) * 2; }
129
129
 
130
130
  /* Triangle Spans */
131
- &>span { background-color: $mainColor; position: absolute; right: 0; top: 0; height: 100%; width: $btnBase * 3; border-left: 1px solid darken($mainColor, 15%); @include box-shadow(1px 1px 0 $shinyEdge inset); @include single-transition(background-color, .15s, ease-in-out);
131
+ &>span { background-color: $mainColor; position: absolute; #{$defaultOpposite}: 0; top: 0; height: 100%; width: $btnBase * 3; border-#{$defaultFloat}: 1px solid darken($mainColor, 15%); @include box-shadow(1px 1px 0 $shinyEdge inset); @include single-transition(background-color, .15s, ease-in-out);
132
132
  &:hover { background-color: darken($mainColor, 10%); }
133
- &:after { @include cssTriangle(6px, #fff, top); position: absolute; top: 50%; left: 50%; margin-left: -6px; margin-top: -2px; }
133
+ &:after { @include cssTriangle(6px, #fff, top); position: absolute; top: 50%; #{$defaultFloat}: 50%; margin-#{$defaultFloat}: -6px; margin-top: -2px; }
134
134
  }
135
135
  &.secondary>span:after { @include cssTriangle(6px, darken(($secondaryColor), 80%), top); }
136
136
 
@@ -138,14 +138,14 @@
138
138
  &.small span { width: $smallBtnBase * 3; }
139
139
  &.tiny span { width: $tinyBtnBase * 3; }
140
140
 
141
- &.large span:after { @include cssTriangle(7px, #fff, top); margin-top: -3px; margin-left: -7px; }
142
- &.small span:after { @include cssTriangle(4px, #fff, top); margin-top: -1px; margin-left: -4px; }
143
- &.tiny span:after { @include cssTriangle(3px, #fff, top); margin-top: -1px; margin-left: -3px; }
141
+ &.large span:after { @include cssTriangle(7px, #fff, top); margin-top: -3px; margin-#{$defaultFloat}: -7px; }
142
+ &.small span:after { @include cssTriangle(4px, #fff, top); margin-top: -1px; margin-#{$defaultFloat}: -4px; }
143
+ &.tiny span:after { @include cssTriangle(3px, #fff, top); margin-top: -1px; margin-#{$defaultFloat}: -3px; }
144
144
 
145
145
  /* Colors */
146
- &.alert>span { background-color: $alertColor; border-left-color: darken($alertColor, 15%); }
147
- &.success>span { background-color: $successColor; border-left-color: darken($successColor, 15%); }
148
- &.secondary>span { background-color: $secondaryColor; border-left-color: darken($secondaryColor, 15%); }
146
+ &.alert>span { background-color: $alertColor; border-#{$defaultFloat}-color: darken($alertColor, 15%); }
147
+ &.success>span { background-color: $successColor; border-#{$defaultFloat}-color: darken($successColor, 15%); }
148
+ &.secondary>span { background-color: $secondaryColor; border-#{$defaultFloat}-color: darken($secondaryColor, 15%); }
149
149
  &.secondary>a { color: darken(($secondaryColor), 80%); }
150
150
 
151
151
  &.alert>a:hover, &.alert>span:hover { background-color: darken($alertColor, 10%); }
@@ -158,8 +158,8 @@
158
158
 
159
159
  ul.button-group { list-style: none; padding: 0; margin: 0 0 12px; @include clearfix();
160
160
 
161
- li { padding: 0; margin: 0 0 0 -1px; float: left;
162
- &:first-child { margin-left: 0; }
161
+ li { padding: 0; margin: 0 0 0 -1px; float: $defaultFloat;
162
+ &:first-child { margin-#{$defaultFloat}: 0; }
163
163
  }
164
164
 
165
165
  &.radius li {
@@ -167,12 +167,12 @@
167
167
  &.button, &.button.radius, &.button-rounded { @include border-radius(0px); }
168
168
  }
169
169
  &:first-child a {
170
- &.button, &.button.radius { @include border-left-radius($buttonRadius); }
171
- &.button.rounded { @include border-left-radius(1000px); }
170
+ &.button, &.button.radius { @include border-corner-radius($defaultFloat, $buttonRadius); }
171
+ &.button.rounded { @include border-corner-radius($defaultFloat, 1000px); }
172
172
  }
173
173
  &:last-child a {
174
- &.button, &.button.radius { @include border-right-radius($buttonRadius); }
175
- &.button.rounded { @include border-right-radius(1000px); }
174
+ &.button, &.button.radius { @include border-corner-radius($defaultOpposite, $buttonRadius); }
175
+ &.button.rounded { @include border-corner-radius($defaultOpposite, 1000px); }
176
176
  }
177
177
  }
178
178
 
@@ -194,11 +194,11 @@
194
194
  &.small { padding: ($smallBtnBase) ($smallBtnBase * 2) ($smallBtnBase + 1); }
195
195
  &.tiny { padding: ($tinyBtnBase) ($tinyBtnBase * 2) ($tinyBtnBase + 1); }
196
196
  }
197
- &.even button.button, &.even input[type="submit"].button { width: 100%; padding-left: 0; padding-right: 0; }
197
+ &.even button.button, &.even input[type="submit"].button { width: 100%; padding-#{$defaultFloat}: 0; padding-#{$defaultOpposite}: 0; }
198
198
  }
199
199
  }
200
200
 
201
201
  div.button-bar { overflow: hidden;
202
- ul.button-group { float: left; margin-right: 8px; }
203
- ul.button-group:last-child { margin-left: 0; }
202
+ ul.button-group { float: $defaultFloat; margin-#{$defaultOpposite}: 8px; }
203
+ ul.button-group:last-child { margin-#{$defaultFloat}: 0; }
204
204
  }