]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add Sass variables for title bar, closes #7294
authorGeoff Kimball <geoff@zurb.com>
Mon, 30 Nov 2015 23:44:06 +0000 (15:44 -0800)
committerGeoff Kimball <geoff@zurb.com>
Mon, 30 Nov 2015 23:44:06 +0000 (15:44 -0800)
docs/pages/off-canvas.md
scss/components/_title-bar.scss

index 1a0a22e5a5f2a1f2995896d4fc966e2861da7951..2b6ad5bf99f3662ee80058b620959e39ae1aef9d 100644 (file)
@@ -1,7 +1,9 @@
 ---
 title: Off-canvas
 description: Off-canvas menus are positioned outside of the viewport and slide in when activated. Setting up an off-canvas layout in Foundation is super easy.
-sass: scss/components/_off-canvas.scss
+sass:
+  - scss/components/_off-canvas.scss
+  - scss/components/_title-bar.scss
 js: js/foundation.offcanvas.js
 tags:
   - navigation
index 524b433ac058e8944523d37004d4a43e0fb32054..8fa78e4268a3f3841c71ccabe717e3c20bd62ba2 100644 (file)
@@ -6,16 +6,44 @@
 /// @group title-bar
 ////
 
+/// Background color of a title bar.
+/// @type Color
+$titlebar-background: $black !default;
+
+/// Color of text inside a title bar.
+/// @type Color
+$titlebar-color: $white !default;
+
+/// Padding inside a title bar.
+/// @type Length
+$titlebar-padding: 0.5rem !default;
+
+/// Font weight of text inside a title bar.
+/// @type Weight
+$titlebar-text-font-weight: bold !default;
+
+/// Color of menu icons inside a title bar.
+/// @type Color
+$titlebar-icon-color: $white !default;
+
+/// Color of menu icons inside a title bar on hover.
+/// @type Color
+$titlebar-icon-color-hover: $medium-gray !default;
+
+/// Spacing between the menu icon and text inside a title bar.
+/// @type Length
+$titlebar-icon-spacing: 0.25rem !default;
+
 @mixin foundation-title-bar {
   .title-bar {
     @include clearfix;
-    background: $black;
-    color: $white;
-    padding: 0.5rem;
+    background: $titlebar-background;
+    color: $titlebar-color;
+    padding: $titlebar-padding;
 
     .menu-icon {
-      margin-#{$global-left}: 0.25rem;
-      margin-#{$global-right}: 0.5rem;
+      margin-#{$global-left}: $titlebar-icon-spacing;
+      margin-#{$global-right}: $titlebar-padding;
     }
   }
 
   }
 
   .title-bar-title {
-    font-weight: bold;
+    font-weight: $titlebar-text-font-weight;
     vertical-align: middle;
     display: inline-block;
   }
 
   .menu-icon {
-    @include hamburger($color: white, $color-hover: $medium-gray);
-  }
-
-  .menu-icon.dark {
-    @include hamburger;
+    @include hamburger($color: $titlebar-icon-color, $color-hover: $titlebar-icon-color-hover);
   }
 }