foundation-rails 5.0.1.0

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 (136) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +1 -0
  7. data/app/controllers/foundation/rails/styleguide_controller.rb +10 -0
  8. data/app/views/foundation/rails/styleguide/show.html.erb +134 -0
  9. data/config/routes.rb +3 -0
  10. data/foundation-rails.gemspec +25 -0
  11. data/lib/foundation-rails.rb +1 -0
  12. data/lib/foundation/rails.rb +3 -0
  13. data/lib/foundation/rails/engine.rb +7 -0
  14. data/lib/foundation/rails/generators/install_generator.rb +56 -0
  15. data/lib/foundation/rails/templates/application.html.erb +19 -0
  16. data/lib/foundation/rails/templates/application.html.haml +18 -0
  17. data/lib/foundation/rails/templates/application.html.slim +17 -0
  18. data/lib/foundation/rails/version.rb +5 -0
  19. data/test/dummy/.gitignore +16 -0
  20. data/test/dummy/Gemfile +47 -0
  21. data/test/dummy/README.rdoc +28 -0
  22. data/test/dummy/Rakefile +6 -0
  23. data/test/dummy/app/assets/images/.keep +0 -0
  24. data/test/dummy/app/assets/javascripts/application.js +8 -0
  25. data/test/dummy/app/assets/stylesheets/application.css +4 -0
  26. data/test/dummy/app/assets/stylesheets/foundation_and_overrides.scss +4 -0
  27. data/test/dummy/app/controllers/application_controller.rb +5 -0
  28. data/test/dummy/app/controllers/concerns/.keep +0 -0
  29. data/test/dummy/app/controllers/styleguide_controller.rb +4 -0
  30. data/test/dummy/app/helpers/application_helper.rb +2 -0
  31. data/test/dummy/app/helpers/styleguide_helper.rb +2 -0
  32. data/test/dummy/app/mailers/.keep +0 -0
  33. data/test/dummy/app/models/.keep +0 -0
  34. data/test/dummy/app/models/concerns/.keep +0 -0
  35. data/test/dummy/app/views/layouts/application.html.erb +19 -0
  36. data/test/dummy/app/views/styleguide/show.html.erb +109 -0
  37. data/test/dummy/bin/bundle +3 -0
  38. data/test/dummy/bin/rails +4 -0
  39. data/test/dummy/bin/rake +4 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/config/application.rb +23 -0
  42. data/test/dummy/config/boot.rb +4 -0
  43. data/test/dummy/config/database.yml +25 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +29 -0
  46. data/test/dummy/config/environments/production.rb +80 -0
  47. data/test/dummy/config/environments/test.rb +36 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy/config/initializers/inflections.rb +16 -0
  51. data/test/dummy/config/initializers/mime_types.rb +5 -0
  52. data/test/dummy/config/initializers/secret_token.rb +12 -0
  53. data/test/dummy/config/initializers/session_store.rb +3 -0
  54. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  55. data/test/dummy/config/locales/en.yml +23 -0
  56. data/test/dummy/config/routes.rb +3 -0
  57. data/test/dummy/db/seeds.rb +7 -0
  58. data/test/dummy/lib/assets/.keep +0 -0
  59. data/test/dummy/lib/tasks/.keep +0 -0
  60. data/test/dummy/log/.keep +0 -0
  61. data/test/dummy/public/404.html +58 -0
  62. data/test/dummy/public/422.html +58 -0
  63. data/test/dummy/public/500.html +57 -0
  64. data/test/dummy/public/favicon.ico +0 -0
  65. data/test/dummy/public/robots.txt +5 -0
  66. data/test/dummy/test/controllers/.keep +0 -0
  67. data/test/dummy/test/controllers/styleguide_controller_test.rb +9 -0
  68. data/test/dummy/test/fixtures/.keep +0 -0
  69. data/test/dummy/test/helpers/.keep +0 -0
  70. data/test/dummy/test/helpers/styleguide_helper_test.rb +4 -0
  71. data/test/dummy/test/integration/.keep +0 -0
  72. data/test/dummy/test/mailers/.keep +0 -0
  73. data/test/dummy/test/models/.keep +0 -0
  74. data/test/dummy/test/test_helper.rb +15 -0
  75. data/test/dummy/vendor/assets/javascripts/.keep +0 -0
  76. data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
  77. data/vendor/_settings.scss +992 -0
  78. data/vendor/assets/javascripts/foundation.js +15 -0
  79. data/vendor/assets/javascripts/foundation/foundation.abide.js +201 -0
  80. data/vendor/assets/javascripts/foundation/foundation.accordion.js +41 -0
  81. data/vendor/assets/javascripts/foundation/foundation.alert.js +34 -0
  82. data/vendor/assets/javascripts/foundation/foundation.clearing.js +450 -0
  83. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +184 -0
  84. data/vendor/assets/javascripts/foundation/foundation.interchange.js +304 -0
  85. data/vendor/assets/javascripts/foundation/foundation.joyride.js +839 -0
  86. data/vendor/assets/javascripts/foundation/foundation.js +416 -0
  87. data/vendor/assets/javascripts/foundation/foundation.magellan.js +118 -0
  88. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +37 -0
  89. data/vendor/assets/javascripts/foundation/foundation.orbit.js +434 -0
  90. data/vendor/assets/javascripts/foundation/foundation.reveal.js +347 -0
  91. data/vendor/assets/javascripts/foundation/foundation.tab.js +37 -0
  92. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +202 -0
  93. data/vendor/assets/javascripts/foundation/foundation.topbar.js +380 -0
  94. data/vendor/assets/javascripts/vendor/modernizr.js +4 -0
  95. data/vendor/assets/stylesheets/foundation.scss +38 -0
  96. data/vendor/assets/stylesheets/foundation/_functions.scss +75 -0
  97. data/vendor/assets/stylesheets/foundation/_settings.scss +992 -0
  98. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +49 -0
  99. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +113 -0
  100. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +83 -0
  101. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +123 -0
  102. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +97 -0
  103. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +234 -0
  104. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +233 -0
  105. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +125 -0
  106. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +159 -0
  107. data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +47 -0
  108. data/vendor/assets/stylesheets/foundation/components/_forms.scss +472 -0
  109. data/vendor/assets/stylesheets/foundation/components/_functions.scss +70 -0
  110. data/vendor/assets/stylesheets/foundation/components/_global.scss +387 -0
  111. data/vendor/assets/stylesheets/foundation/components/_grid.scss +234 -0
  112. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +52 -0
  113. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +220 -0
  114. data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +57 -0
  115. data/vendor/assets/stylesheets/foundation/components/_labels.scss +100 -0
  116. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +30 -0
  117. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +360 -0
  118. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +353 -0
  119. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +145 -0
  120. data/vendor/assets/stylesheets/foundation/components/_panels.scss +87 -0
  121. data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +146 -0
  122. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +75 -0
  123. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +165 -0
  124. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +83 -0
  125. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +187 -0
  126. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +118 -0
  127. data/vendor/assets/stylesheets/foundation/components/_switch.scss +314 -0
  128. data/vendor/assets/stylesheets/foundation/components/_tables.scss +93 -0
  129. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +95 -0
  130. data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +71 -0
  131. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +121 -0
  132. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +590 -0
  133. data/vendor/assets/stylesheets/foundation/components/_type.scss +447 -0
  134. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +661 -0
  135. data/vendor/assets/stylesheets/normalize.scss +410 -0
  136. metadata +292 -0
@@ -0,0 +1,93 @@
1
+ @import "global";
2
+
3
+ //
4
+ // @name _tables.scss
5
+ // @dependencies _global.scss
6
+ //
7
+
8
+ //
9
+ // @variables
10
+ //
11
+
12
+ $include-html-table-classes: $include-html-classes !default;
13
+
14
+ // These control the background color for the table and even rows
15
+ $table-bg: #fff !default;
16
+ $table-even-row-bg: #f9f9f9 !default;
17
+
18
+ // These control the table cell border style
19
+ $table-border-style: solid !default;
20
+ $table-border-size: 1px !default;
21
+ $table-border-color: #ddd !default;
22
+
23
+ // These control the table head styles
24
+ $table-head-bg: #f5f5f5 !default;
25
+ $table-head-font-size: rem-calc(14) !default;
26
+ $table-head-font-color: #222 !default;
27
+ $table-head-font-weight: bold !default;
28
+ $table-head-padding: rem-calc(8 10 10) !default;
29
+
30
+ // These control the row padding and font styles
31
+ $table-row-padding: rem-calc(9 10) !default;
32
+ $table-row-font-size: rem-calc(14) !default;
33
+ $table-row-font-color: #222 !default;
34
+ $table-line-height: rem-calc(18) !default;
35
+
36
+ // These are for controlling the display and margin of tables
37
+ $table-display: table-cell !default;
38
+ $table-margin-bottom: rem-calc(20) !default;
39
+
40
+
41
+ //
42
+ // @mixins
43
+ //
44
+
45
+ @mixin table {
46
+ background: $table-bg;
47
+ margin-bottom: $table-margin-bottom;
48
+ border: $table-border-style $table-border-size $table-border-color;
49
+
50
+ thead,
51
+ tfoot {
52
+ background: $table-head-bg;
53
+ font-weight: $table-head-font-weight;
54
+
55
+ tr {
56
+ th,
57
+ td {
58
+ padding: $table-head-padding;
59
+ font-size: $table-head-font-size;
60
+ color: $table-head-font-color;
61
+ text-align: $default-float;
62
+ }
63
+ }
64
+ }
65
+
66
+ tr {
67
+ th,
68
+ td {
69
+ padding: $table-row-padding;
70
+ font-size: $table-row-font-size;
71
+ color: $table-row-font-color;
72
+ }
73
+
74
+ &.even,
75
+ &.alt,
76
+ &:nth-of-type(even) { background: $table-even-row-bg; }
77
+ }
78
+
79
+ thead tr th,
80
+ tfoot tr th,
81
+ tbody tr td,
82
+ tr td,
83
+ tfoot tr td { display: $table-display; line-height: $table-line-height; }
84
+ }
85
+
86
+
87
+ @include exports("table") {
88
+ @if $include-html-table-classes {
89
+ table {
90
+ @include table;
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,95 @@
1
+ @import "global";
2
+
3
+ //
4
+ // @variables
5
+ //
6
+
7
+ $include-html-tabs-classes: $include-html-classes !default;
8
+
9
+ $tabs-navigation-padding: rem-calc(16) !default;
10
+ $tabs-navigation-bg-color: #efefef !default;
11
+ $tabs-navigation-hover-bg-color: darken($tabs-navigation-bg-color, 5%) !default;
12
+ $tabs-navigation-font-color: #222 !default;
13
+ $tabs-navigation-font-size: rem-calc(16) !default;
14
+ $tabs-navigation-font-family: $body-font-family !default;
15
+
16
+ $tabs-content-margin-bottom: rem-calc(24) !default;
17
+ $tabs-content-padding: $column-gutter/2 !default;
18
+
19
+ $tabs-vertical-navigation-margin-bottom: 1.25rem !default;
20
+
21
+ @include exports("tab") {
22
+ @if $include-html-tabs-classes {
23
+ .tabs {
24
+ @include clearfix;
25
+ margin-bottom: 0 !important;
26
+ dd {
27
+ position: relative;
28
+ margin-bottom: 0 !important;
29
+ top: 1px;
30
+ float: $default-float;
31
+ > a {
32
+ display: block;
33
+ background: $tabs-navigation-bg-color;
34
+ color: $tabs-navigation-font-color;
35
+ padding-top: $tabs-navigation-padding;
36
+ padding-#{$opposite-direction}: $tabs-navigation-padding * 2;
37
+ padding-bottom: $tabs-navigation-padding + rem-calc(1);
38
+ padding-#{$default-float}: $tabs-navigation-padding * 2;
39
+ font-family: $tabs-navigation-font-family;
40
+ font-size: $tabs-navigation-font-size;
41
+ &:hover { background: $tabs-navigation-hover-bg-color; }
42
+ }
43
+ &.active a { background: #fff; }
44
+ }
45
+ &.radius {
46
+ dd:first-child {
47
+ a { @include side-radius($default-float, $global-radius); }
48
+ }
49
+ dd:last-child {
50
+ a { @include side-radius($opposite-direction, $global-radius); }
51
+ }
52
+ }
53
+ &.vertical {
54
+ dd {
55
+ position: inherit;
56
+ float: none;
57
+ display: block;
58
+ top: auto;
59
+ }
60
+ }
61
+ }
62
+
63
+ .tabs-content {
64
+ @include clearfix;
65
+ margin-bottom: $tabs-content-margin-bottom;
66
+ > .content {
67
+ display: none;
68
+ float: $default-float;
69
+ padding: $tabs-content-padding 0;
70
+ &.active { display: block; }
71
+ &.contained { padding: $tabs-content-padding; }
72
+ }
73
+ &.vertical {
74
+ display: block;
75
+ > .content { padding: 0 $tabs-content-padding; }
76
+ }
77
+ }
78
+ @media #{$medium-up} {
79
+ .tabs {
80
+ &.vertical {
81
+ width: 20%;
82
+ float: $default-float;
83
+ margin-bottom: $tabs-vertical-navigation-margin-bottom;
84
+ }
85
+ }
86
+ .tabs-content {
87
+ &.vertical {
88
+ width: 80%;
89
+ float: $default-float;
90
+ margin-#{$default-float}: -1px;
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
@@ -0,0 +1,71 @@
1
+ @import "global";
2
+
3
+
4
+
5
+ //
6
+ // @name _thumbs.scss
7
+ // @dependencies _globals.scss
8
+ //
9
+
10
+ //
11
+ // @variables
12
+ //
13
+
14
+ $include-html-media-classes: $include-html-classes !default;
15
+
16
+ // We use these to control border styles
17
+ $thumb-border-style: solid !default;
18
+ $thumb-border-width: 4px !default;
19
+ $thumb-border-color: #fff !default;
20
+ $thumb-box-shadow: 0 0 0 1px rgba(#000,.2) !default;
21
+ $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5) !default;
22
+
23
+ // Radius and transition speed for thumbs
24
+ $thumb-radius: $global-radius !default;
25
+ $thumb-transition-speed: 200ms !default;
26
+
27
+ //
28
+ // @mixins
29
+ //
30
+
31
+ // We use this to create image thumbnail styles.
32
+ //
33
+ // $border-width - Width of border around thumbnail. Default: $thumb-border-width.
34
+ // $box-shadow - Box shadow to apply to thumbnail. Default: $thumb-box-shadow.
35
+ // $box-shadow-hover - Box shadow to apply on hover. Default: $thumb-box-shadow-hover.
36
+ @mixin thumb(
37
+ $border-width:$thumb-border-width,
38
+ $box-shadow:$thumb-box-shadow,
39
+ $box-shadow-hover:$thumb-box-shadow-hover) {
40
+ line-height: 0;
41
+ display: inline-block;
42
+ border: $thumb-border-style $border-width $thumb-border-color;
43
+ @if $experimental {
44
+ -webkit-box-shadow: $box-shadow;
45
+ }
46
+ box-shadow: $box-shadow;
47
+
48
+ &:hover,
49
+ &:focus {
50
+ @if $experimental {
51
+ -webkit-box-shadow: $box-shadow-hover;
52
+ }
53
+ box-shadow: $box-shadow-hover;
54
+ }
55
+ }
56
+
57
+
58
+ @include exports("thumb") {
59
+ @if $include-html-media-classes {
60
+
61
+ /* Image Thumbnails */
62
+ .th {
63
+ @include thumb;
64
+ @include single-transition(all,$thumb-transition-speed,ease-out);
65
+
66
+ &.radius { @include radius($thumb-radius); }
67
+ }
68
+ a.th { display: inline-block; max-width:100%; }
69
+
70
+ }
71
+ }
@@ -0,0 +1,121 @@
1
+ @import "global";
2
+
3
+ //
4
+ // Tooltip Variables
5
+ //
6
+ $include-html-tooltip-classes: $include-html-classes !default;
7
+
8
+ $has-tip-border-bottom: dotted 1px #ccc !default;
9
+ $has-tip-font-weight: bold !default;
10
+ $has-tip-font-color: #333 !default;
11
+ $has-tip-border-bottom-hover: dotted 1px darken($primary-color, 20%) !default;
12
+ $has-tip-font-color-hover: $primary-color !default;
13
+ $has-tip-cursor-type: help !default;
14
+
15
+ $tooltip-padding: rem-calc(12) !default;
16
+ $tooltip-bg: #333 !default;
17
+ $tooltip-font-size: rem-calc(14) !default;
18
+ $tooltip-font-weight: normal !default;
19
+ $tooltip-font-color: #fff !default;
20
+ $tooltip-line-height: 1.3 !default;
21
+ $tooltip-close-font-size: rem-calc(10) !default;
22
+ $tooltip-close-font-weight: normal !default;
23
+ $tooltip-close-font-color: #777 !default;
24
+ $tooltip-font-size-sml: rem-calc(14) !default;
25
+ $tooltip-radius: $global-radius !default;
26
+ $tooltip-pip-size: 5px !default;
27
+
28
+ @include exports("tooltip") {
29
+ @if $include-html-tooltip-classes {
30
+
31
+ /* Tooltips */
32
+ .has-tip {
33
+ border-bottom: $has-tip-border-bottom;
34
+ cursor: $has-tip-cursor-type;
35
+ font-weight: $has-tip-font-weight;
36
+ color: $has-tip-font-color;
37
+
38
+ &:hover,
39
+ &:focus {
40
+ border-bottom: $has-tip-border-bottom-hover;
41
+ color: $has-tip-font-color-hover;
42
+ }
43
+
44
+ &.tip-left,
45
+ &.tip-right { float: none !important; }
46
+ }
47
+
48
+ .tooltip {
49
+ display: none;
50
+ position: absolute;
51
+ z-index: 999;
52
+ font-weight: $tooltip-font-weight;
53
+ font-size: $tooltip-font-size;
54
+ line-height: $tooltip-line-height;
55
+ padding: $tooltip-padding;
56
+ max-width: 85%;
57
+ #{$default-float}: 50%;
58
+ width: 100%;
59
+ color: $tooltip-font-color;
60
+ background: $tooltip-bg;
61
+ @include radius($tooltip-radius);
62
+
63
+ &>.nub {
64
+ display: block;
65
+ #{$default-float}: $tooltip-pip-size;
66
+ position: absolute;
67
+ width: 0;
68
+ height: 0;
69
+ border: solid $tooltip-pip-size;
70
+ border-color: transparent transparent $tooltip-bg transparent;
71
+ top: -($tooltip-pip-size * 2);
72
+ }
73
+
74
+ &.opened {
75
+ color: $has-tip-font-color-hover !important;
76
+ border-bottom: $has-tip-border-bottom-hover !important;
77
+ }
78
+ }
79
+
80
+ .tap-to-close {
81
+ display: block;
82
+ font-size: $tooltip-close-font-size;
83
+ color: $tooltip-close-font-color;
84
+ font-weight: $tooltip-close-font-weight;
85
+ }
86
+
87
+ @media #{$small} {
88
+ .tooltip {
89
+ &>.nub {
90
+ border-color: transparent transparent $tooltip-bg transparent;
91
+ top: -($tooltip-pip-size * 2);
92
+ }
93
+ &.tip-top>.nub {
94
+ border-color: $tooltip-bg transparent transparent transparent;
95
+ top: auto;
96
+ bottom: -($tooltip-pip-size * 2);
97
+ }
98
+
99
+ &.tip-left,
100
+ &.tip-right { float: none !important; }
101
+
102
+ &.tip-left>.nub {
103
+ border-color: transparent transparent transparent $tooltip-bg;
104
+ right: -($tooltip-pip-size * 2);
105
+ left: auto;
106
+ top: 50%;
107
+ margin-top: -$tooltip-pip-size;
108
+ }
109
+ &.tip-right>.nub {
110
+ border-color: transparent $tooltip-bg transparent transparent;
111
+ right: auto;
112
+ left: -($tooltip-pip-size * 2);
113
+ top: 50%;
114
+ margin-top: -$tooltip-pip-size;
115
+ }
116
+
117
+ }
118
+ }
119
+
120
+ }
121
+ }
@@ -0,0 +1,590 @@
1
+ @import "global";
2
+ @import "grid";
3
+
4
+ //
5
+ // Top Bar Variables
6
+ //
7
+ $include-html-top-bar-classes: $include-html-classes !default;
8
+
9
+ // Background color for the top bar
10
+ $topbar-bg-color: #333 !default;
11
+ $topbar-bg: $topbar-bg-color !default;
12
+
13
+ // Height and margin
14
+ $topbar-height: 45px !default;
15
+ $topbar-margin-bottom: 0 !default;
16
+
17
+ // Control Input height for top bar
18
+
19
+ // Controlling the styles for the title in the top bar
20
+ $topbar-title-weight: normal !default;
21
+ $topbar-title-font-size: rem-calc(17) !default;
22
+
23
+ // Style the top bar dropdown elements
24
+ $topbar-dropdown-bg: #333 !default;
25
+ $topbar-dropdown-link-color: #fff !default;
26
+ $topbar-dropdown-link-bg: #333 !default;
27
+ $topbar-dropdown-toggle-size: 5px !default;
28
+ $topbar-dropdown-toggle-color: #fff !default;
29
+ $topbar-dropdown-toggle-alpha: 0.4 !default;
30
+
31
+ // Set the link colors and styles for top-level nav
32
+ $topbar-link-color: #fff !default;
33
+ $topbar-link-color-hover: #fff !default;
34
+ $topbar-link-color-active: #fff !default;
35
+ $topbar-link-weight: normal !default;
36
+ $topbar-link-font-size: rem-calc(13) !default;
37
+ $topbar-link-hover-lightness: -10% !default; // Darken by 10%
38
+ $topbar-link-bg-hover: #272727 !default;
39
+ $topbar-link-bg-active: $primary-color !default;
40
+ $topbar-link-bg-active-hover: darken($primary-color, 5%) !default;
41
+ $topbar-link-font-family: $body-font-family !default;
42
+
43
+ $topbar-button-font-size: 0.75rem;
44
+
45
+ $topbar-dropdown-label-color: #777 !default;
46
+ $topbar-dropdown-label-text-transform: uppercase !default;
47
+ $topbar-dropdown-label-font-weight: bold !default;
48
+ $topbar-dropdown-label-font-size: rem-calc(10) !default;
49
+ $topbar-dropdown-label-bg: #333 !default;
50
+
51
+ // Top menu icon styles
52
+ $topbar-menu-link-transform: uppercase !default;
53
+ $topbar-menu-link-font-size: rem-calc(13) !default;
54
+ $topbar-menu-link-weight: bold !default;
55
+ $topbar-menu-link-color: #fff !default;
56
+ $topbar-menu-icon-color: #fff !default;
57
+ $topbar-menu-link-color-toggled: #888 !default;
58
+ $topbar-menu-icon-color-toggled: #888 !default;
59
+
60
+ // Transitions and breakpoint styles
61
+ $topbar-transition-speed: 300ms !default;
62
+ // Using rem-calc for the below breakpoint causes issues with top bar
63
+ $topbar-breakpoint: #{lower-bound($medium-range)} !default; // Change to 9999px for always mobile layout
64
+ $topbar-media-query: $medium-up !default;
65
+
66
+ // Divider Styles
67
+ $topbar-divider-border-bottom: solid 1px lighten($topbar-bg-color, 10%) !default;
68
+ $topbar-divider-border-top: solid 1px darken($topbar-bg-color, 10%) !default;
69
+
70
+ // Sticky Class
71
+ $topbar-sticky-class: ".sticky" !default;
72
+ $topbar-arrows: true !default; //Set false to remove the triangle icon from the menu item
73
+
74
+ // Used to provide media query values for javascript components.
75
+ // This class is generated despite the value of $include-html-top-bar-classes
76
+ // to ensure width calculations work correctly.
77
+ meta.foundation-mq-topbar {
78
+ font-family: "/" + unquote($topbar-media-query) + "/";
79
+ width: $topbar-breakpoint;
80
+ }
81
+
82
+ @include exports("top-bar") {
83
+ @if $include-html-top-bar-classes {
84
+
85
+ /* Wrapped around .top-bar to contain to grid width */
86
+ .contain-to-grid {
87
+ width: 100%;
88
+ background: $topbar-bg;
89
+
90
+ .top-bar { margin-bottom: $topbar-margin-bottom; }
91
+ }
92
+
93
+ // Wrapped around .top-bar to make it stick to the top
94
+ .fixed {
95
+ width: 100%;
96
+ #{$default-float}: 0;
97
+ position: fixed;
98
+ top: 0;
99
+ z-index: 99;
100
+
101
+ &.expanded:not(.top-bar) {
102
+ overflow-y: auto;
103
+ height: auto;
104
+ width: 100%;
105
+ max-height: 100%;
106
+
107
+ .title-area {
108
+ position: fixed;
109
+ width: 100%;
110
+ z-index: 99;
111
+ }
112
+ // Ensure you can scroll the menu on small screens
113
+ .top-bar-section {
114
+ z-index: 98;
115
+ margin-top: $topbar-height;
116
+ }
117
+ }
118
+ }
119
+
120
+ .top-bar {
121
+ overflow: hidden;
122
+ height: $topbar-height;
123
+ line-height: $topbar-height;
124
+ position: relative;
125
+ background: $topbar-bg;
126
+ margin-bottom: $topbar-margin-bottom;
127
+
128
+ // Topbar Global list Styles
129
+ ul {
130
+ margin-bottom: 0;
131
+ list-style: none;
132
+ }
133
+
134
+ .row { max-width: none; }
135
+
136
+ form,
137
+ input { margin-bottom: 0; }
138
+
139
+ input { height: auto; padding-top: .35rem; padding-bottom: .35rem; font-size: $topbar-button-font-size; }
140
+
141
+ .button {
142
+ padding-top: .45rem;
143
+ padding-bottom: .35rem;
144
+ margin-bottom: 0;
145
+ font-size: $topbar-button-font-size;
146
+ // position: relative;
147
+ // top: -1px;
148
+
149
+ }
150
+
151
+ // Title Area
152
+ .title-area {
153
+ position: relative;
154
+ margin: 0;
155
+ }
156
+
157
+ .name {
158
+ height: $topbar-height;
159
+ margin: 0;
160
+ font-size: $rem-base;
161
+
162
+ h1 {
163
+ line-height: $topbar-height;
164
+ font-size: $topbar-title-font-size;
165
+ margin: 0;
166
+ a {
167
+ font-weight: $topbar-title-weight;
168
+ color: $topbar-link-color;
169
+ width: 50%;
170
+ display: block;
171
+ padding: 0 $topbar-height / 3;
172
+ }
173
+ }
174
+ }
175
+
176
+ // Menu toggle button on small devices
177
+ .toggle-topbar {
178
+ position: absolute;
179
+ #{$opposite-direction}: 0;
180
+ top: 0;
181
+
182
+ a {
183
+ color: $topbar-link-color;
184
+ text-transform: $topbar-menu-link-transform;
185
+ font-size: $topbar-menu-link-font-size;
186
+ font-weight: $topbar-menu-link-weight;
187
+ position: relative;
188
+ display: block;
189
+ padding: 0 $topbar-height / 3;
190
+ height: $topbar-height;
191
+ line-height: $topbar-height;
192
+ }
193
+
194
+ // Adding the class "menu-icon" will add the 3-line icon people love and adore.
195
+ &.menu-icon {
196
+ #{$opposite-direction}: $topbar-height / 3;
197
+ top: 50%;
198
+ margin-top: -16px;
199
+ padding-#{$default-float}: 40px;
200
+
201
+ a {
202
+ text-indent: -48px;
203
+ width: 34px;
204
+ height: 34px;
205
+ line-height: 33px;
206
+ padding: 0;
207
+ color: $topbar-menu-link-color;
208
+
209
+ span {
210
+ position: absolute;
211
+ #{$opposite-direction}: 0;
212
+ display: block;
213
+ width: 16px;
214
+ height: 0;
215
+ // Shh, don't tell, but box-shadows create the menu icon :)
216
+ @if $experimental {
217
+ -webkit-box-shadow: 0 10px 0 1px $topbar-menu-icon-color,
218
+ 0 16px 0 1px $topbar-menu-icon-color,
219
+ 0 22px 0 1px $topbar-menu-icon-color;
220
+ }
221
+ box-shadow: 0 10px 0 1px $topbar-menu-icon-color,
222
+ 0 16px 0 1px $topbar-menu-icon-color,
223
+ 0 22px 0 1px $topbar-menu-icon-color;
224
+ }
225
+ }
226
+ }
227
+ }
228
+
229
+ // Change things up when the top-bar is expanded
230
+ &.expanded {
231
+ height: auto;
232
+ background: transparent;
233
+
234
+ .title-area { background: $topbar-bg; }
235
+
236
+ .toggle-topbar {
237
+ a { color: $topbar-menu-link-color-toggled;
238
+ span {
239
+ // Shh, don't tell, but box-shadows create the menu icon :)
240
+ @if $experimental {
241
+ -webkit-box-shadow: 0 10px 0 1px $topbar-menu-icon-color-toggled,
242
+ 0 16px 0 1px $topbar-menu-icon-color-toggled,
243
+ 0 22px 0 1px $topbar-menu-icon-color-toggled;
244
+ }
245
+ box-shadow: 0 10px 0 1px $topbar-menu-icon-color-toggled,
246
+ 0 16px 0 1px $topbar-menu-icon-color-toggled,
247
+ 0 22px 0 1px $topbar-menu-icon-color-toggled;
248
+ }
249
+ }
250
+ }
251
+ }
252
+
253
+
254
+
255
+ }
256
+
257
+ // Right and Left Navigation that stacked by default
258
+ .top-bar-section {
259
+ #{$default-float}: 0;
260
+ position: relative;
261
+ width: auto;
262
+ @include single-transition($default-float, $topbar-transition-speed);
263
+
264
+ ul {
265
+ width: 100%;
266
+ height: auto;
267
+ display: block;
268
+ background: $topbar-dropdown-bg;
269
+ font-size: $rem-base;
270
+ margin: 0;
271
+ }
272
+
273
+ .divider,
274
+ [role="separator"] {
275
+ border-top: $topbar-divider-border-top;
276
+ clear: both;
277
+ height: 1px;
278
+ width: 100%;
279
+ }
280
+
281
+ ul li {
282
+ & > a {
283
+ display: block;
284
+ width: 100%;
285
+ color: $topbar-link-color;
286
+ padding: 12px 0 12px 0;
287
+ padding-#{$default-float}: $topbar-height / 3;
288
+ font-family: $topbar-link-font-family;
289
+ font-size: $topbar-link-font-size;
290
+ font-weight: $topbar-link-weight;
291
+ background: $topbar-dropdown-bg;
292
+
293
+ &.button {
294
+ background: $primary-color;
295
+ font-size: $topbar-link-font-size;
296
+ padding-right: $topbar-height / 3;
297
+ padding-left: $topbar-height / 3;
298
+ &:hover {
299
+ background: darken($primary-color, 10%);
300
+ }
301
+ }
302
+ &.button.secondary {
303
+ background: $secondary-color;
304
+ &:hover {
305
+ background: darken($secondary-color, 10%);
306
+ }
307
+ }
308
+ &.button.success {
309
+ background: $success-color;
310
+ &:hover {
311
+ background: darken($success-color, 10%);
312
+ }
313
+ }
314
+ &.button.alert {
315
+ background: $alert-color;
316
+ &:hover {
317
+ background: darken($alert-color, 10%);
318
+ }
319
+ }
320
+
321
+ }
322
+
323
+ // Apply the hover link color when it has that class
324
+ &:hover > a {
325
+ background: $topbar-link-bg-hover;
326
+ color: $topbar-link-color-hover;
327
+
328
+ }
329
+
330
+ // Apply the active link color when it has that class
331
+ &.active > a {
332
+ background: $topbar-link-bg-active;
333
+ color: $topbar-link-color-active;
334
+ &:hover {
335
+ background: $topbar-link-bg-active-hover;
336
+ }
337
+ }
338
+ }
339
+
340
+ // Add some extra padding for list items contains buttons
341
+ .has-form { padding: $topbar-height / 3; }
342
+
343
+ // Styling for list items that have a dropdown within them.
344
+ .has-dropdown {
345
+ position: relative;
346
+
347
+ & > a {
348
+ &:after {
349
+ @if ($topbar-arrows){
350
+ @include css-triangle($topbar-dropdown-toggle-size, rgba($topbar-dropdown-toggle-color, $topbar-dropdown-toggle-alpha), $default-float);
351
+ }
352
+ margin-#{$opposite-direction}: $topbar-height / 3;
353
+ margin-top: -($topbar-dropdown-toggle-size / 2) - 2;
354
+ position: absolute;
355
+ top: 50%;
356
+ #{$opposite-direction}: 0;
357
+ }
358
+ }
359
+
360
+ &.moved { position: static;
361
+ & > .dropdown {
362
+ display: block;
363
+ }
364
+ }
365
+ }
366
+
367
+ // Styling elements inside of dropdowns
368
+ .dropdown {
369
+ position: absolute;
370
+ #{$default-float}: 100%;
371
+ top: 0;
372
+ display: none;
373
+ z-index: 99;
374
+
375
+ li {
376
+ width: 100%;
377
+ height: auto;
378
+
379
+ a {
380
+ font-weight: normal;
381
+ padding: 8px $topbar-height / 3;
382
+ &.parent-link {
383
+ font-weight: $topbar-link-weight;
384
+ }
385
+ }
386
+
387
+ &.title h5 { margin-bottom: 0;
388
+ a {
389
+ color: $topbar-link-color;
390
+ line-height: $topbar-height / 2;
391
+ display: block;
392
+ }
393
+ }
394
+ }
395
+
396
+ label {
397
+ padding: 8px $topbar-height / 3 2px;
398
+ margin-bottom: 0;
399
+ text-transform: $topbar-dropdown-label-text-transform;
400
+ color: $topbar-dropdown-label-color;
401
+ font-weight: $topbar-dropdown-label-font-weight;
402
+ font-size: $topbar-dropdown-label-font-size;
403
+ }
404
+ }
405
+ }
406
+
407
+ .js-generated { display: block; }
408
+
409
+
410
+ // Top Bar styles intended for screen sizes above the breakpoint.
411
+ @media #{$topbar-media-query} {
412
+ .top-bar {
413
+ background: $topbar-bg;
414
+ @include clearfix;
415
+ overflow: visible;
416
+
417
+ .toggle-topbar { display: none; }
418
+
419
+ .title-area { float: $default-float; }
420
+ .name h1 a { width: auto; }
421
+
422
+ input,
423
+ .button {
424
+ font-size: rem-calc(14);
425
+ position: relative;
426
+ top: 7px;
427
+ }
428
+
429
+ &.expanded { background: $topbar-bg; }
430
+ }
431
+
432
+ .contain-to-grid .top-bar {
433
+ max-width: $row-width;
434
+ margin: 0 auto;
435
+ margin-bottom: $topbar-margin-bottom;
436
+ }
437
+
438
+ .top-bar-section {
439
+ @include single-transition(none,0,0);
440
+ #{$default-float}: 0 !important;
441
+
442
+ ul {
443
+ width: auto;
444
+ height: auto !important;
445
+ display: inline;
446
+
447
+ li {
448
+ float: $default-float;
449
+ .js-generated { display: none; }
450
+ }
451
+ }
452
+
453
+ li {
454
+ &.hover {
455
+ > a:not(.button) {
456
+ background: $topbar-link-bg-hover;
457
+ color: $topbar-link-color-hover;
458
+ }
459
+ }
460
+ a:not(.button) {
461
+ padding: 0 $topbar-height / 3;
462
+ line-height: $topbar-height;
463
+ background: $topbar-bg;
464
+ &:hover { background: $topbar-link-bg-hover; }
465
+ }
466
+ }
467
+
468
+ .has-dropdown {
469
+
470
+ @if($topbar-arrows){
471
+
472
+ & > a {
473
+ padding-#{$opposite-direction}: $topbar-height / 3 + 20 !important;
474
+ &:after {
475
+ @include css-triangle($topbar-dropdown-toggle-size, rgba($topbar-dropdown-toggle-color, $topbar-dropdown-toggle-alpha), top);
476
+ margin-top: -($topbar-dropdown-toggle-size / 2);
477
+ top: $topbar-height / 2;
478
+ }
479
+ }
480
+
481
+ }
482
+
483
+ &.moved { position: relative;
484
+ & > .dropdown { display: none; }
485
+ }
486
+
487
+ &.hover, &.not-click:hover {
488
+ & > .dropdown {
489
+ display: block;
490
+ }
491
+ }
492
+
493
+ .dropdown li.has-dropdown {
494
+ & > a {
495
+ &:after {
496
+ border: none;
497
+ content: "\00bb";
498
+ top: 1rem;
499
+ margin-top: -2px;
500
+ #{$opposite-direction}: 5px;
501
+ }
502
+ }
503
+ }
504
+
505
+ }
506
+
507
+ .dropdown {
508
+ #{$default-float}: 0;
509
+ top: auto;
510
+ background: transparent;
511
+ min-width: 100%;
512
+
513
+ li {
514
+ a {
515
+ color: $topbar-dropdown-link-color;
516
+ line-height: 1;
517
+ white-space: nowrap;
518
+ padding: 12px $topbar-height / 3;
519
+ background: $topbar-dropdown-link-bg;
520
+ }
521
+
522
+ label {
523
+ white-space: nowrap;
524
+ background: $topbar-dropdown-label-bg;
525
+ }
526
+
527
+ // Second Level Dropdowns
528
+ .dropdown {
529
+ #{$default-float}: 100%;
530
+ top: 0;
531
+ }
532
+ }
533
+ }
534
+
535
+ & > ul > .divider,
536
+ & > ul > [role="separator"] {
537
+ border-bottom: none;
538
+ border-top: none;
539
+ border-#{$opposite-direction}: $topbar-divider-border-bottom;
540
+ clear: none;
541
+ height: $topbar-height;
542
+ width: 0;
543
+ }
544
+
545
+ .has-form {
546
+ background: $topbar-bg;
547
+ padding: 0 $topbar-height / 3;
548
+ height: $topbar-height;
549
+ }
550
+
551
+ // Position overrides for ul.right
552
+ ul.right {
553
+ li .dropdown {
554
+ left: auto;
555
+ right: 0;
556
+
557
+ li .dropdown { right: 100%; }
558
+ }
559
+ }
560
+ }
561
+
562
+ // Degrade gracefully when Javascript is disabled. Displays dropdown and changes
563
+ // background & text color on hover.
564
+ .no-js .top-bar-section {
565
+ ul li {
566
+ // Apply the hover link color when it has that class
567
+ &:hover > a {
568
+ background: $topbar-link-bg-hover;
569
+ color: $topbar-link-color-hover;
570
+ }
571
+
572
+ // Apply the active link color when it has that class
573
+ &:active > a {
574
+ background: $topbar-link-bg-active;
575
+ color: $topbar-link-color-active;
576
+ }
577
+ }
578
+
579
+ .has-dropdown {
580
+ &:hover {
581
+ & > .dropdown {
582
+ display: block;
583
+ }
584
+ }
585
+ }
586
+ }
587
+ }
588
+
589
+ }
590
+ }