css - Broken Zurb Foundation 4 responsive navbar menu icon -
i'm using latest zurb-foundation gem ruby project. navbar should responsive , show menu 3 horizontal bars when screen width small enough. i'm getting show words "menu", not horizontal bars. when menu expanded, styling further off.
expanded navbar: http://d.pr/i/rtoo
i able reproduce in jsfiddle using css , js used project (only jquery , zurb foundation stuff now). http://jsfiddle.net/uvl7e/
is markup wrong? don't have custom css navbar yet , not using other css libraries.
the scss file use foundation below (mostly defaults):
// // foundation variables // // default font-size set 100% of browser style sheet (usually 16px) // compatibility brower-based text zoom or user-set defaults. $base-font-size: 100% !default; // $base-line-height 24px while $base-font-size 16px // $base-line-height: 150%; // default html , body font-size base em value. // since typical default browser font-size 16px, makes calculation grid size. // if want base font-size different size , not have effect grid size too, // set value of $em-base $base-font-size ($em-base: $base-font-size;) $em-base: 16px !default; // working in ems annoying. think in pixels using handy function, emcalc(#px) @function emcalc($pxwidth) { @return $pxwidth / $em-base * 1em; } // colors $primary-color: #2ba6cb; $secondary-color: #e9e9e9; $alert-color: #c60f13; $success-color: #5da423; // make sure border radius matches unless want different. $global-radius: 3px; // media queries $small-screen: emcalc(768px); $medium-screen: emcalc(1280px); $large-screen: emcalc(1440px); // // form variables // // base lots of form spacing , positioning styles // $form-spacing: emcalc(16px); // labels $form-label-pointer: pointer; $form-label-font-size: emcalc(14px); $form-label-font-weight: 500; $form-label-font-color: lighten(#000, 30%); $form-label-bottom-margin: emcalc(3px); $input-font-family: inherit; $input-font-color: rgba(0,0,0,0.75); $input-font-size: emcalc(14px); $input-bg-color: #fff; $input-focus-bg-color: darken(#fff, 2%); $input-border-color: darken(#fff, 20%); $input-focus-border-color: darken(#fff, 40%); $input-border-style: solid; $input-border-width: 1px; $input-disabled-bg: #ddd; $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); // button background $button-bg-color: #d8e1ed; // button text styles. // $button-font-family: inherit; // $button-font-color: #fff; // $button-font-color-alt: #333; $button-font-med: emcalc(16px); // $button-font-tny: emcalc(11px); // $button-font-sml: emcalc(13px); // $button-font-lrg: emcalc(20px); // $button-font-weight: bold; // $button-font-align: center; // various hover effects. $button-function-factor: 10%; // button border styles. $button-border-width: 1px; $button-border-style: solid; $button-border-color: darken($primary-color, $button-function-factor); // radius used throughout core. $button-radius: 6px; // opacity disabled buttons. $button-disabled-opacity: 0.6; // // top bar variables // // background color top bar $topbar-bg: #222; // height , margin // $topbar-height: 45px; $topbar-margin-bottom: emcalc(30px); // input height top bar $topbar-input-height: 2.45em; // title in top bar $topbar-title-weight: bold; $topbar-title-font-size: emcalc(17px); // link colors , styles top-level nav $topbar-link-color: #fff; $topbar-link-weight: bold; $topbar-link-font-size: emcalc(13px); $topbar-link-hover-lightness: -50% !default; // darken 30% // top bar dropdown elements // $topbar-dropdown-bg: #333; // $topbar-dropdown-link-color: #fff; // $topbar-dropdown-toggle-size: 5px; // $topbar-dropdown-toggle-color: #fff; // $topbar-dropdown-toggle-alpha: 0.5; // $dropdown-label-color: #555; // top menu icon styles $topbar-menu-link-transform: uppercase; $topbar-menu-link-font-size: emcalc(13px); $topbar-menu-link-weight: bold; $topbar-menu-link-color: #fff; $topbar-menu-icon-color: #fff; $topbar-menu-link-color-toggled: #888; $topbar-menu-icon-color-toggled: #888; // transitions , breakpoint styles $topbar-transition-speed: 900ms; $topbar-breakpoint: $small-screen; $topbar-media-query: "only screen , (min-width: "#{$topbar-breakpoint}")"; @import 'foundation';
it's pretty easy, class name has changed.
from:
<li class="toggle-topbar menu-item"> <a href="#"> <span>menu</span> </a> </li> to:
<li class="toggle-topbar menu-icon"> <a href="#"> <span>menu</span> </a> </li> see http://jsfiddle.net/volker_e/mxmjt/2/
i've added yellow border on top, result label doesn't overlap menu icon.
Comments
Post a Comment