zurb-foundation-5 5.2.2

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 (123) hide show
  1. checksums.yaml +7 -0
  2. data/.bowerrc +3 -0
  3. data/.editorconfig +9 -0
  4. data/.gitignore +46 -0
  5. data/.travis.yml +34 -0
  6. data/CONTRIBUTING.md +55 -0
  7. data/Gemfile +3 -0
  8. data/Gemfile.lock +16 -0
  9. data/Gruntfile.js +222 -0
  10. data/LICENSE +22 -0
  11. data/README.md +44 -0
  12. data/bower.json +20 -0
  13. data/composer.json +9 -0
  14. data/foundation.gemspec +21 -0
  15. data/humans.txt +8 -0
  16. data/js/foundation/foundation.abide.js +299 -0
  17. data/js/foundation/foundation.accordion.js +54 -0
  18. data/js/foundation/foundation.alert.js +43 -0
  19. data/js/foundation/foundation.clearing.js +531 -0
  20. data/js/foundation/foundation.dropdown.js +306 -0
  21. data/js/foundation/foundation.equalizer.js +68 -0
  22. data/js/foundation/foundation.interchange.js +331 -0
  23. data/js/foundation/foundation.joyride.js +849 -0
  24. data/js/foundation/foundation.js +609 -0
  25. data/js/foundation/foundation.magellan.js +173 -0
  26. data/js/foundation/foundation.offcanvas.js +50 -0
  27. data/js/foundation/foundation.orbit.js +606 -0
  28. data/js/foundation/foundation.reveal.js +427 -0
  29. data/js/foundation/foundation.slider.js +200 -0
  30. data/js/foundation/foundation.tab.js +168 -0
  31. data/js/foundation/foundation.tooltip.js +272 -0
  32. data/js/foundation/foundation.topbar.js +422 -0
  33. data/karma.conf.js +114 -0
  34. data/lib/foundation/engine.rb +20 -0
  35. data/lib/foundation/generators/USAGE +15 -0
  36. data/lib/foundation/generators/install_generator.rb +54 -0
  37. data/lib/foundation/generators/templates/application.html.erb +47 -0
  38. data/lib/foundation/generators/templates/application.html.haml +31 -0
  39. data/lib/foundation/generators/templates/application.html.slim +35 -0
  40. data/lib/foundation/sprockets.rb +4 -0
  41. data/lib/foundation/version.rb +3 -0
  42. data/lib/scss.js +114 -0
  43. data/lib/zurb-foundation.rb +33 -0
  44. data/package.json +48 -0
  45. data/robots.txt +4 -0
  46. data/run-tests.sh +83 -0
  47. data/sache.json +5 -0
  48. data/scss/foundation.scss +45 -0
  49. data/scss/foundation/_functions.scss +101 -0
  50. data/scss/foundation/_settings.scss +1279 -0
  51. data/scss/foundation/components/_accordion.scss +52 -0
  52. data/scss/foundation/components/_alert-boxes.scss +126 -0
  53. data/scss/foundation/components/_block-grid.scss +132 -0
  54. data/scss/foundation/components/_breadcrumbs.scss +127 -0
  55. data/scss/foundation/components/_button-groups.scss +108 -0
  56. data/scss/foundation/components/_buttons.scss +222 -0
  57. data/scss/foundation/components/_clearing.scss +247 -0
  58. data/scss/foundation/components/_dropdown-buttons.scss +129 -0
  59. data/scss/foundation/components/_dropdown.scss +248 -0
  60. data/scss/foundation/components/_flex-video.scss +51 -0
  61. data/scss/foundation/components/_forms.scss +496 -0
  62. data/scss/foundation/components/_global.scss +365 -0
  63. data/scss/foundation/components/_grid.scss +261 -0
  64. data/scss/foundation/components/_inline-lists.scss +56 -0
  65. data/scss/foundation/components/_joyride.scss +220 -0
  66. data/scss/foundation/components/_keystrokes.scss +61 -0
  67. data/scss/foundation/components/_labels.scss +104 -0
  68. data/scss/foundation/components/_magellan.scss +34 -0
  69. data/scss/foundation/components/_offcanvas.scss +381 -0
  70. data/scss/foundation/components/_orbit.scss +415 -0
  71. data/scss/foundation/components/_pagination.scss +150 -0
  72. data/scss/foundation/components/_panels.scss +91 -0
  73. data/scss/foundation/components/_pricing-tables.scss +150 -0
  74. data/scss/foundation/components/_progress-bars.scss +79 -0
  75. data/scss/foundation/components/_range-slider.scss +148 -0
  76. data/scss/foundation/components/_reveal-new.scss +0 -0
  77. data/scss/foundation/components/_reveal.scss +216 -0
  78. data/scss/foundation/components/_side-nav.scss +93 -0
  79. data/scss/foundation/components/_split-buttons.scss +191 -0
  80. data/scss/foundation/components/_sub-nav.scss +125 -0
  81. data/scss/foundation/components/_switch.scss +294 -0
  82. data/scss/foundation/components/_tables.scss +97 -0
  83. data/scss/foundation/components/_tabs.scss +105 -0
  84. data/scss/foundation/components/_thumbs.scss +68 -0
  85. data/scss/foundation/components/_tooltips.scss +140 -0
  86. data/scss/foundation/components/_top-bar.scss +640 -0
  87. data/scss/foundation/components/_type.scss +493 -0
  88. data/scss/foundation/components/_visibility.scss +345 -0
  89. data/scss/foundation/test.html +0 -0
  90. data/scss/normalize.scss +423 -0
  91. data/spec/abide/abide.js +173 -0
  92. data/spec/abide/advanced.html +22 -0
  93. data/spec/abide/basic.html +13 -0
  94. data/spec/accordion/accordion.js +94 -0
  95. data/spec/accordion/basic.html +39 -0
  96. data/spec/accordion/grid.html +44 -0
  97. data/spec/accordion/multiexpand.html +20 -0
  98. data/spec/alert/alert.js +35 -0
  99. data/spec/alert/basic.html +4 -0
  100. data/spec/clearing/222.gif +0 -0
  101. data/spec/clearing/777.gif +0 -0
  102. data/spec/clearing/basic.html +5 -0
  103. data/spec/clearing/ccc.gif +0 -0
  104. data/spec/clearing/clearing.js +55 -0
  105. data/spec/dropdown/basic.html +10 -0
  106. data/spec/dropdown/dropdown.js +65 -0
  107. data/spec/equalizer/basic.html +24 -0
  108. data/spec/equalizer/equalizer.js +30 -0
  109. data/spec/framework/framework.js +14 -0
  110. data/spec/helpers.js +37 -0
  111. data/spec/interchange/basic.html +3 -0
  112. data/spec/interchange/interchange.js +60 -0
  113. data/spec/joyride/joyride.js +14 -0
  114. data/spec/magellan/magellan.js +14 -0
  115. data/spec/offcanvas/offcanvas.js +14 -0
  116. data/spec/orbit/orbit.js +14 -0
  117. data/spec/reveal/reveal.js +14 -0
  118. data/spec/tab/tab.js +14 -0
  119. data/spec/tooltip/tooltip.js +14 -0
  120. data/spec/topbar/multidropdown.html +60 -0
  121. data/spec/topbar/sticky.html +31 -0
  122. data/spec/topbar/topbar.js +96 -0
  123. metadata +238 -0
@@ -0,0 +1,52 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+
7
+ //
8
+ // @variables
9
+ //
10
+
11
+ $include-html-accordion-classes: $include-html-classes !default;
12
+
13
+ $accordion-navigation-padding: rem-calc(16) !default;
14
+ $accordion-navigation-bg-color: #efefef !default;
15
+ $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%) !default;
16
+ $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%) !default;
17
+ $accordion-navigation-font-color: #222 !default;
18
+ $accordion-navigation-font-size: rem-calc(16) !default;
19
+ $accordion-navigation-font-family: $body-font-family !default;
20
+
21
+ $accordion-content-padding: $column-gutter/2 !default;
22
+ $accordion-content-active-bg-color: #fff !default;
23
+
24
+ @include exports("accordion") {
25
+ @if $include-html-accordion-classes {
26
+ .accordion {
27
+ @include clearfix; margin-bottom: 0;
28
+ dd {
29
+ display: block;
30
+ margin-bottom: 0 !important;
31
+ &.active > a { background: $accordion-navigation-active-bg-color; }
32
+ > a {
33
+ background: $accordion-navigation-bg-color;
34
+ color: $accordion-navigation-font-color;
35
+ padding: $accordion-navigation-padding;
36
+ display: block;
37
+ font-family: $accordion-navigation-font-family;
38
+ font-size: $accordion-navigation-font-size;
39
+ &:hover { background: $accordion-navigation-hover-bg-color; }
40
+ }
41
+ }
42
+ .content {
43
+ display: none;
44
+ padding: $accordion-content-padding;
45
+ &.active {
46
+ display: block;
47
+ background: $accordion-content-active-bg-color;
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,126 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+
7
+ //
8
+ // Alert Box Variables
9
+ //
10
+ $include-html-alert-classes: $include-html-classes !default;
11
+
12
+ // We use this to control alert padding.
13
+ $alert-padding-top: rem-calc(14) !default;
14
+ $alert-padding-default-float: $alert-padding-top !default;
15
+ $alert-padding-opposite-direction: $alert-padding-top + rem-calc(10) !default;
16
+ $alert-padding-bottom: $alert-padding-top !default;
17
+
18
+ // We use these to control text style.
19
+ $alert-font-weight: normal !default;
20
+ $alert-font-size: rem-calc(13) !default;
21
+ $alert-font-color: #fff !default;
22
+ $alert-font-color-alt: scale-color($secondary-color, $lightness: -66%) !default;
23
+
24
+ // We use this for close hover effect.
25
+ $alert-function-factor: -14% !default;
26
+
27
+ // We use these to control border styles.
28
+ $alert-border-style: solid !default;
29
+ $alert-border-width: 1px !default;
30
+ $alert-border-color: scale-color($primary-color, $lightness: $alert-function-factor) !default;
31
+ $alert-bottom-margin: rem-calc(20) !default;
32
+
33
+ // We use these to style the close buttons
34
+ $alert-close-color: #333 !default;
35
+ $alert-close-top: 50% !default;
36
+ $alert-close-position: rem-calc(4) !default;
37
+ $alert-close-font-size: rem-calc(22) !default;
38
+ $alert-close-opacity: 0.3 !default;
39
+ $alert-close-opacity-hover: 0.5 !default;
40
+ $alert-close-padding: 9px 6px 4px !default;
41
+
42
+ // We use this to control border radius
43
+ $alert-radius: $global-radius !default;
44
+
45
+ $alert-transition-speed: 300ms !default;
46
+ $alert-transition-ease: ease-out !default;
47
+
48
+ //
49
+ // Alert Mixins
50
+ //
51
+
52
+ // We use this mixin to create a default alert base.
53
+ @mixin alert-base {
54
+ border-style: $alert-border-style;
55
+ border-width: $alert-border-width;
56
+ display: block;
57
+ font-weight: $alert-font-weight;
58
+ margin-bottom: $alert-bottom-margin;
59
+ position: relative;
60
+ padding: $alert-padding-top $alert-padding-opposite-direction $alert-padding-bottom $alert-padding-default-float;
61
+ font-size: $alert-font-size;
62
+ @include single-transition(opacity, $alert-transition-speed, $alert-transition-ease)
63
+ }
64
+
65
+ // We use this mixin to add alert styles
66
+ //
67
+ // $bg - The background of the alert. Default: $primary-color.
68
+ @mixin alert-style($bg:$primary-color) {
69
+
70
+ // This find the lightness percentage of the background color.
71
+ $bg-lightness: lightness($bg);
72
+
73
+ // We control which background color and border come through.
74
+ background-color: $bg;
75
+ border-color: scale-color($bg, $lightness: $alert-function-factor);
76
+
77
+ // We control the text color for you based on the background color.
78
+ @if $bg-lightness > 70% { color: $alert-font-color-alt; }
79
+ @else { color: $alert-font-color; }
80
+
81
+ }
82
+
83
+ // We use this to create the close button.
84
+ @mixin alert-close {
85
+ font-size: $alert-close-font-size;
86
+ padding: $alert-close-padding;
87
+ line-height: 0;
88
+ position: absolute;
89
+ top: $alert-close-top;
90
+ margin-top: -($alert-close-font-size / 2);
91
+ #{$opposite-direction}: $alert-close-position;
92
+ color: $alert-close-color;
93
+ opacity: $alert-close-opacity;
94
+ &:hover,
95
+ &:focus { opacity: $alert-close-opacity-hover; }
96
+ }
97
+
98
+ // We use this to quickly create alerts with a single mixin.
99
+ //
100
+ // $bg - Background of alert. Default: $primary-color.
101
+ // $radius - Radius of alert box. Default: false.
102
+ @mixin alert($bg:$primary-color, $radius:false) {
103
+ @include alert-base;
104
+ @include alert-style($bg);
105
+ @include radius($radius);
106
+ }
107
+
108
+ @include exports("alert-box") {
109
+ @if $include-html-alert-classes {
110
+ .alert-box {
111
+ @include alert;
112
+
113
+ .close { @include alert-close; }
114
+
115
+ &.radius { @include radius($alert-radius); }
116
+ &.round { @include radius($global-rounded); }
117
+
118
+ &.success { @include alert-style($success-color); }
119
+ &.alert { @include alert-style($alert-color); }
120
+ &.secondary { @include alert-style($secondary-color); }
121
+ &.warning { @include alert-style($warning-color); }
122
+ &.info { @include alert-style($info-color); }
123
+ &.alert-close { opacity: 0}
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,132 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+
7
+ //
8
+ // Block Grid Variables
9
+ //
10
+ $include-html-grid-classes: $include-html-classes !default;
11
+ $include-xl-html-block-grid-classes: false !default;
12
+
13
+ // We use this to control the maximum number of block grid elements per row
14
+ $block-grid-elements: 12 !default;
15
+ $block-grid-default-spacing: rem-calc(20) !default;
16
+
17
+ $align-block-grid-to-grid: false !default;
18
+ @if $align-block-grid-to-grid {
19
+ $block-grid-default-spacing: $column-gutter;
20
+ }
21
+
22
+ // Enables media queries for block-grid classes. Set to false if writing semantic HTML.
23
+ $block-grid-media-queries: true !default;
24
+
25
+ //
26
+ // Block Grid Mixins
27
+ //
28
+
29
+ // Create a custom block grid
30
+ //
31
+ // $per-row - # of items to display per row. Default: false.
32
+ // $spacing - # of ems to use as padding on each block item. Default: rem-calc(20).
33
+ // $base-style - Apply a base style to block grid. Default: true.
34
+ @mixin block-grid(
35
+ $per-row:false,
36
+ $spacing:$block-grid-default-spacing,
37
+ $include-spacing:true,
38
+ $base-style:true) {
39
+
40
+ @if $base-style {
41
+ display: block;
42
+ padding: 0;
43
+ @if $align-block-grid-to-grid {
44
+ margin: 0;
45
+ } @else {
46
+ margin: 0 (-$spacing/2);
47
+ }
48
+ @include clearfix;
49
+
50
+ &>li {
51
+ display: block;
52
+ height: auto;
53
+ float: $default-float;
54
+ @if $include-spacing {
55
+ padding: 0 ($spacing/2) $spacing;
56
+ }
57
+ }
58
+ }
59
+
60
+ @if $per-row {
61
+ &>li {
62
+ width: 100%/$per-row;
63
+ @if $include-spacing {
64
+ padding: 0 ($spacing/2) $spacing;
65
+ }
66
+ list-style: none;
67
+
68
+ &:nth-of-type(n) { clear: none; }
69
+ &:nth-of-type(#{$per-row}n+1) { clear: both; }
70
+ @if $align-block-grid-to-grid {
71
+ @include block-grid-aligned($per-row, $spacing);
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+ @mixin block-grid-aligned($per-row, $spacing) {
78
+ @for $i from 1 through $block-grid-elements {
79
+ @if $per-row >= $i {
80
+ $grid-column: '+' + $i;
81
+ @if $per-row == $i {
82
+ $grid-column: '';
83
+ }
84
+ &:nth-of-type(#{$per-row}n#{unquote($grid-column)}) {
85
+ padding-left: ($spacing - (($spacing / $per-row) * ($per-row - ($i - 1))));
86
+ padding-right: ($spacing - (($spacing / $per-row) * $i));
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ // Generate presentational markup for block grid.
93
+ //
94
+ // $size - Name of class to use, i.e. "large" will generate .large-block-grid-1, .large-block-grid-2, etc.
95
+ @mixin block-grid-html-classes($size,$include-spacing) {
96
+ @for $i from 1 through $block-grid-elements {
97
+ .#{$size}-block-grid-#{($i)} {
98
+ @include block-grid($i,$block-grid-default-spacing,$include-spacing,false);
99
+ }
100
+ }
101
+ }
102
+
103
+ @include exports("block-grid") {
104
+ @if $include-html-grid-classes {
105
+
106
+ [class*="block-grid-"] { @include block-grid; }
107
+
108
+ @if $block-grid-media-queries {
109
+ @media #{$small-up} {
110
+ @include block-grid-html-classes($size:small,$include-spacing:false);
111
+ }
112
+
113
+ @media #{$medium-up} {
114
+ @include block-grid-html-classes($size:medium,$include-spacing:false);
115
+ }
116
+
117
+ @media #{$large-up} {
118
+ @include block-grid-html-classes($size:large,$include-spacing:false);
119
+ }
120
+
121
+ @if $include-xl-html-block-grid-classes {
122
+ @media #{$xlarge-up} {
123
+ @include block-grid-html-classes($size:xlarge,$include-spacing:false);
124
+ }
125
+
126
+ @media #{$xxlarge-up} {
127
+ @include block-grid-html-classes($size:xxlarge,$include-spacing:false);
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
@@ -0,0 +1,127 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+
7
+ //
8
+ // Breadcrumb Variables
9
+ //
10
+ $include-html-nav-classes: $include-html-classes !default;
11
+
12
+ // We use this to set the background color for the breadcrumb container.
13
+ $crumb-bg: scale-color($secondary-color, $lightness: 55%) !default;
14
+
15
+ // We use these to set the padding around the breadcrumbs.
16
+ $crumb-padding: rem-calc(9 14 9) !default;
17
+ $crumb-side-padding: rem-calc(12) !default;
18
+
19
+ // We use these to control border styles.
20
+ $crumb-function-factor: -10% !default;
21
+ $crumb-border-size: 1px !default;
22
+ $crumb-border-style: solid !default;
23
+ $crumb-border-color: scale-color($crumb-bg, $lightness: $crumb-function-factor) !default;
24
+ $crumb-radius: $global-radius !default;
25
+
26
+ // We use these to set various text styles for breadcrumbs.
27
+ $crumb-font-size: rem-calc(11) !default;
28
+ $crumb-font-color: $primary-color !default;
29
+ $crumb-font-color-current: #333 !default;
30
+ $crumb-font-color-unavailable: #999 !default;
31
+ $crumb-font-transform: uppercase !default;
32
+ $crumb-link-decor: underline !default;
33
+
34
+ // We use these to control the slash between breadcrumbs
35
+ $crumb-slash-color: #aaa !default;
36
+ $crumb-slash: "/" !default;
37
+
38
+ //
39
+ // Breadcrumb Mixins
40
+ //
41
+
42
+ // We use this mixin to create a container around our breadcrumbs
43
+ @mixin crumb-container {
44
+ display: block;
45
+ padding: $crumb-padding;
46
+ overflow: hidden;
47
+ margin-#{$default-float}: 0;
48
+ list-style: none;
49
+ border-style: $crumb-border-style;
50
+ border-width: $crumb-border-size;
51
+
52
+ // We control which background color and border come through.
53
+ background-color: $crumb-bg;
54
+ border-color: $crumb-border-color;
55
+ }
56
+
57
+ // We use this mixin to create breadcrumb styles from list items.
58
+ @mixin crumbs {
59
+
60
+ // A normal state will make the links look and act like clickable breadcrumbs.
61
+ margin: 0;
62
+ float: $default-float;
63
+ font-size: $crumb-font-size;
64
+ line-height: $crumb-font-size;
65
+ text-transform: $crumb-font-transform;
66
+ color: $crumb-font-color;
67
+
68
+ &:hover a, &:focus a { text-decoration: $crumb-link-decor; }
69
+
70
+ a {
71
+ color: $crumb-font-color;
72
+ }
73
+
74
+ // Current is for the link of the current page
75
+ &.current {
76
+ cursor: $cursor-default-value;
77
+ color: $crumb-font-color-current;
78
+ a {
79
+ cursor: $cursor-default-value;
80
+ color: $crumb-font-color-current;
81
+ }
82
+
83
+ &:hover, &:hover a,
84
+ &:focus, &:focus a { text-decoration: none; }
85
+ }
86
+
87
+ // Unavailable removed color and link styles so it looks inactive.
88
+ &.unavailable {
89
+ color: $crumb-font-color-unavailable;
90
+ a { color: $crumb-font-color-unavailable; }
91
+
92
+ &:hover,
93
+ &:hover a,
94
+ &:focus,
95
+ a:focus {
96
+ text-decoration: none;
97
+ color: $crumb-font-color-unavailable;
98
+ cursor: $cursor-default-value;
99
+ }
100
+ }
101
+
102
+ &:before {
103
+ content: "#{$crumb-slash}";
104
+ color: $crumb-slash-color;
105
+ margin: 0 $crumb-side-padding;
106
+ position: relative;
107
+ top: 1px;
108
+ }
109
+
110
+ &:first-child:before {
111
+ content: " ";
112
+ margin: 0;
113
+ }
114
+ }
115
+
116
+ @include exports("breadcrumbs") {
117
+ @if $include-html-nav-classes {
118
+ .breadcrumbs {
119
+ @include crumb-container;
120
+ @include radius($crumb-radius);
121
+
122
+ &>* {
123
+ @include crumbs;
124
+ }
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,108 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+ @import "buttons";
7
+
8
+
9
+ //
10
+ // Button Group Variables
11
+ //
12
+ $include-html-button-classes: $include-html-classes !default;
13
+
14
+ // Sets the margin for the right side by default, and the left margin if right-to-left direction is used
15
+ $button-bar-margin-opposite: rem-calc(10) !default;
16
+ $button-group-border-width: 1px !default;
17
+
18
+ //
19
+ // Button Group Mixins
20
+ //
21
+
22
+ // We use this to add styles for a button group container
23
+ @mixin button-group-container($styles:true, $float:false) {
24
+ @if $styles {
25
+ list-style: none;
26
+ margin: 0;
27
+ #{$default-float}: 0;
28
+ @include clearfix();
29
+ }
30
+ @if $float {
31
+ float: #{$default-float};
32
+ margin-#{$opposite-direction}: $button-bar-margin-opposite;
33
+ & div { overflow: hidden; }
34
+ }
35
+ }
36
+
37
+ // We use this to control styles for button groups
38
+ @mixin button-group-style($radius:false, $even:false, $float:$default-float) {
39
+
40
+ > button, .button {
41
+ border-#{$default-float}: $button-group-border-width solid;
42
+ border-color: rgba(255, 255, 255, 0.5);
43
+ }
44
+
45
+ &:first-child {
46
+ button, .button {
47
+ border-#{$default-float}: 0;
48
+ }
49
+ }
50
+
51
+ // We use this to control the flow, or remove those styles completely.
52
+ @if $float {
53
+ margin: 0;
54
+ float: $float;
55
+ // Make sure the first child doesn't get the negative margin.
56
+ &:first-child { margin-#{$default-float}: 0; }
57
+ }
58
+
59
+ // We use these to control left and right radius on first/last buttons in the group.
60
+ @if $radius == true {
61
+ &:first-child,
62
+ &:first-child > a,
63
+ &:first-child > button,
64
+ &:first-child > .button { @include side-radius($default-float, $button-radius); }
65
+ &:last-child,
66
+ &:last-child > a,
67
+ &:last-child > button,
68
+ &:last-child > .button { @include side-radius($opposite-direction, $button-radius); }
69
+ }
70
+ @else if $radius {
71
+ &:first-child,
72
+ &:first-child > a,
73
+ &:first-child > button,
74
+ &:first-child > .button { @include side-radius($default-float, $radius); }
75
+ &:last-child,
76
+ &:last-child > a,
77
+ &:last-child > button,
78
+ &:last-child > .button { @include side-radius($opposite-direction, $radius); }
79
+ }
80
+
81
+ // We use this to make the buttons even width across their container
82
+ @if $even {
83
+ width: percentage((100/$even) / 100);
84
+ button, .button { width: 100%; }
85
+ }
86
+
87
+ }
88
+
89
+ @include exports("button-group") {
90
+ @if $include-html-button-classes {
91
+ .button-group { @include button-group-container;
92
+
93
+ li { @include button-group-style(); }
94
+
95
+ &.radius > * { @include button-group-style($radius:$button-radius, $float:null); }
96
+ &.round > * { @include button-group-style($radius:$button-round, $float:null); }
97
+
98
+ @for $i from 2 through 8 {
99
+ &.even-#{$i} li { @include button-group-style($even:$i, $float:null); }
100
+ }
101
+ }
102
+
103
+ .button-bar {
104
+ @include clearfix;
105
+ .button-group { @include button-group-container($styles:false,$float:true); }
106
+ }
107
+ }
108
+ }