Instantly share code, notes, and snippets.
Created
December 16, 2013 20:08
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save fidelix/7993492 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Header | |
*/ | |
#header { | |
line-height: em(50px); | |
height: em(50px); | |
.two-menus & { | |
border-bottom: 2px solid #EBEBEB; | |
} | |
@include breakpoint($tablet) { | |
line-height: em(80px); | |
height: em(80px); | |
} | |
@include breakpoint($desktop) { | |
line-height: em(40px); | |
height: em(40px); | |
border-bottom: 0; | |
.menu{ | |
@include inline-list; | |
li { | |
float: left; | |
} | |
li li { | |
float: none; | |
} | |
} | |
} | |
} | |
#header, #footer { | |
background: #C5242B; | |
color:#FFF; | |
a { | |
color:#FFF; | |
} | |
.menu { | |
font-size: 1.125em; | |
font-weight: 600; | |
cursor:default; | |
a{ | |
text-decoration: none; | |
} | |
} | |
} | |
#logo { | |
display: block; | |
position: inherit; | |
font-size: 0; | |
a { | |
display: block; | |
position: absolute; | |
width: 100%; | |
text-align: center; | |
line-height: 1; | |
} | |
img { | |
margin-top: 7px; | |
height: 36px; | |
} | |
@include breakpoint($tablet) { | |
float:right; | |
line-height: 1; | |
a{ | |
position: static; | |
} | |
img{ | |
margin-top: 12px; | |
height: 54px; | |
} | |
} | |
@include breakpoint($desktop) { | |
img{ | |
margin-top: 7px; | |
height: 26px; | |
} | |
} | |
} | |
///////////////// | |
// Footer | |
///////////////// | |
#footer{ | |
padding-top: em(40px); | |
padding-bottom: em(35px); | |
clear: both; | |
@include breakpoint($tablet) { | |
padding-top: em(55px); | |
.menu{ | |
@include inline-list; | |
font-size: 0.75em; | |
a{ | |
padding:0 8px; | |
font-weight: 400; | |
} | |
} | |
} | |
@include breakpoint($desktop) { | |
padding-bottom: em(65px); | |
} | |
} | |
.logo-mmda{ | |
text-indent: -9999px; | |
color: transparent; | |
background-image: url(../img/logos/logo-mmda.png); | |
.svg &{ | |
background: url(../img/logos/logo-mmda.svg); | |
} | |
} | |
.two-menus{ | |
#header{ | |
background: #fff; | |
.main-menu-btn{ | |
color:#999; | |
@include breakpoint($desktop) { | |
color: #fff; | |
} | |
} | |
@include breakpoint($desktop) { | |
background: #C5242B; | |
height: em(130px); | |
} | |
} | |
} | |
#block-menu-menu-footer-menu{ | |
display: none; | |
@include breakpoint($tablet) { | |
display: block; | |
// @include grid-span(11, 2); | |
// float: right; | |
//width: 89%; | |
text-align: right; | |
} | |
@include breakpoint($desktop) { | |
//@include grid-span(11, 2); | |
text-align: center; | |
} | |
} | |
///////////////////////////// | |
// Menu do Topo | |
/////////////////////////// | |
.main-menu-btn{ | |
@extend .icon-menu; | |
z-index: 1; | |
position: absolute; | |
-ms-touch-action: none; | |
text-decoration: none; | |
//visibility: hidden; | |
overflow: hidden; | |
-webkit-tap-highlight-color: rgba(0,0,0,0); | |
height: em(50px); | |
padding-left: 10px; | |
margin-left: -10px; | |
width: 57px; | |
&:before{ | |
font-size:2em; | |
//visibility: visible; | |
vertical-align: middle; | |
padding: 13px 16px; | |
margin-left: -10px; | |
@include breakpoint($desktop){ | |
font-size: 1em; | |
padding: 12px 16px; | |
} | |
} | |
@include breakpoint($desktop){ | |
display: none; | |
height: em(40px); | |
position: static; | |
float: left; | |
.two-menus & { | |
display: block; | |
} | |
} | |
} | |
#wrapper{ | |
position: relative; | |
overflow: hidden; | |
width: 100%; | |
} | |
#inner-wrap{ | |
position: relative; | |
width: 100%; | |
left:0; | |
.js-nav &{ | |
left: 82%; | |
@include breakpoint($tablet) { | |
left: 44%; | |
} | |
@include breakpoint($desktop) { | |
left: 0%; | |
} | |
} | |
.csstransforms3d.csstransitions &{ | |
left:0; | |
@include transform(translate3d(0, 0, 0)); | |
@include transition(transform 500ms ease); | |
@include backface-visibility(hidden); | |
} | |
.csstransforms3d.csstransitions.js-nav &{ | |
@include transform(translate3d(82%, 0, 0) scale3d(1, 1, 1)); | |
@include breakpoint($tablet) { | |
@include transform(translate3d(44%, 0, 0) scale3d(1, 1, 1)); | |
} | |
@include breakpoint($desktop) { | |
@include transform(none); | |
} | |
} | |
} | |
#header { | |
// evita que segundo nivel do menu principal fique escondido embaixo da vitrine | |
@include breakpoint($desktop) { | |
position: relative; | |
z-index: 1; | |
} | |
} | |
#header .center-wrapper { | |
position: static; | |
} | |
#nav{ | |
position: absolute; | |
top: 0; | |
//overflow: hidden; // removido pois oculta segundo nivel do menu no firefox | |
background:#972328; | |
letter-spacing: -0.11em; | |
height: 100%; | |
width: 82%; | |
left: -82%; | |
overflow: hidden; | |
h2{ | |
float: left; | |
width: 100%; | |
padding-left:1em; | |
margin:0; | |
position: relative; | |
z-index: 1; | |
font: italic bold #{em(20px)}/#{em(50px)} $serif; | |
background: #A9242A; | |
color:#FFF; | |
@include breakpoint($desktop) { | |
padding-left: 0; | |
} | |
img{ | |
vertical-align: middle; | |
} | |
a{ | |
@include breakpoint($desktop) { | |
padding-left: 0; | |
} | |
} | |
} | |
.title{ | |
background: #A9242A; | |
font-weight: 700; | |
font-style: italic; | |
letter-spacing: normal; | |
a{ cursor: default; } | |
} | |
.block-og-menu{ | |
width: 100%; | |
float: left; | |
position: relative; | |
z-index: 20; | |
background: #972328; | |
.root{ | |
font-style: italic; | |
font-weight: normal; | |
font-family: $serif; | |
} | |
} | |
#block-og-wrapper{ | |
padding: 0; | |
} | |
.two-menus &{ | |
background: #7E2125; | |
.menu a{ border-bottom-color: #6D1F23; } | |
.block-og-menu .menu a{ border-bottom-color: #822125; } | |
} | |
.menu{ | |
padding:0; | |
margin:0; | |
width: 100%; | |
font-weight: 600; | |
} | |
a{ | |
padding-left:1em; | |
display: block; | |
border-bottom: #822125 1px solid; | |
font-weight: normal; | |
&:active { outline: none; } | |
&:focus { -moz-outline-style: none; } | |
} | |
li{ | |
list-style:none; | |
padding:0; | |
margin:0; | |
} | |
.submenu-wrapper{ | |
width: 100%; | |
position: absolute; | |
top: 0; | |
} | |
.menus{ | |
@include opacity(0); | |
} | |
.js-nav & .menus{ | |
@include opacity(1); | |
} | |
// ANIMAÇÕES | |
.csstransforms3d.csstransitions & .menus{ | |
@include transform(scale3d(0.7, 0.7, 0.7)); | |
@include transition(all 500ms ease); | |
@include backface-visibility(hidden); | |
} | |
.csstransforms3d.csstransitions.js-nav & .menus{ | |
@include transform(scale3d(1,1,1)); | |
} | |
.csstransforms3d.csstransitions.js-nav & .root{ | |
@include transform(translate3d(0, 0, 0)); | |
@include transition(all 500ms ease); | |
@include backface-visibility(hidden); | |
} | |
.csstransforms3d.csstransitions.js-nav & .submenu-wrapper{ | |
z-index: -1; | |
@include opacity(0); | |
@include transform(translate3d(150%, 0, 0)); | |
@include transition(all 500ms ease); | |
@include backface-visibility(hidden); | |
&.active{ | |
z-index: 1; | |
@include opacity(1); | |
@include transform(translate3d(100%, 0, 0)); | |
} | |
@include breakpoint($desktop) { | |
z-index: 20; | |
@include opacity(1); | |
} | |
} | |
.csstransforms3d.csstransitions.js-nav & .subnav{ | |
@include transform(translate3d(-100%, 0, 0)); | |
} | |
.expanded{ | |
@extend .icon-seta-dir-sm; | |
&:before{ | |
float: right; | |
line-height: inherit; | |
margin-right: 1.3em; | |
font-size: 0.7em; | |
} | |
} | |
.back{ | |
@extend .icon-seta-esq-sm; | |
&:before{ | |
float: left; | |
line-height: inherit; | |
margin-left: 1em; | |
padding-right: 1em; | |
font-size:0.7em; | |
} | |
} | |
a.active-trail{ | |
background: #E3343C; | |
font-weight: bold; | |
font-style: italic; | |
} | |
////////////////////// | |
// TABLETS | |
////////////////////// | |
@include breakpoint($tablet) { | |
width: 44%; | |
left: -44%; | |
line-height: 3.7em; | |
.block-og-menu{ | |
} | |
ul.root > li.active-trail > a { | |
background: none; | |
color:#FFF; | |
font-weight: 600; | |
&:hover { | |
background: #E3343C; | |
color: #FFF; | |
} | |
} | |
.block-og-menu ul.root > li.active-trail > a, .block-og-menu ul li.active-trail a:hover { | |
background: none; | |
color: #C5242B; | |
} | |
} | |
////////////////// | |
/// DESKTOP | |
///////////////// | |
@include breakpoint($desktop){ | |
position: static; | |
letter-spacing: normal; | |
background: transparent; | |
overflow: visible; | |
line-height: em(40px); | |
@include grid-span(9); | |
h2{ | |
@include grid-span(3, 1); | |
line-height: 4.3em; | |
text-align: left; | |
background: none; | |
span{ | |
display: none; | |
} | |
} | |
.two-menus & { | |
background: transparent; | |
.menu a, a{ border-bottom: none; } | |
} | |
.menus{ | |
@include opacity(1); | |
> .menu.root { | |
> li { | |
font-size: 0.8888888888888889em; //16/18 | |
letter-spacing: -0.04em; | |
} | |
} | |
} | |
.two-menus & .menus > .menu.root { | |
display: block; | |
@include opacity(0); | |
@include transition(all 500ms ease); | |
.js-nav & { | |
@include opacity(1); | |
@include transition(all 500ms ease); | |
} | |
} | |
ul.root > li.active-trail > a { | |
font-weight: 700; | |
} | |
.block-og-menu { | |
z-index: 0; | |
position: absolute; | |
top: 40px; | |
left: 0; | |
text-align: right; | |
background: #fff; | |
.two-menus & { | |
border-bottom: 2px solid #ebebeb; | |
} | |
.submenu-wrapper { | |
//padding: 30px 0 35px; | |
background-color: #E3343B; | |
//background-color: rgba(255, 255, 255, 0.95); | |
} | |
li { | |
float: none; | |
} | |
li li a{ | |
line-height: 1em; | |
} | |
.submenu-wrapper{ | |
width: 11em; | |
margin-top:2px; | |
top: 56px; | |
} | |
.root > li > a{ | |
line-height: em(70px); | |
position: relative; | |
bottom:-2px; // Tamanho da borda. Previne que o hover perca o estado. | |
} | |
.two-menus & { | |
//border-bottom: 2px solid #EBEBEB; | |
} | |
} | |
.csstransforms3d.csstransitions & .menus, | |
.csstransforms3d.csstransitions.js-nav & .menus, | |
.csstransforms3d.csstransitions.js-nav & .root, | |
.csstransforms3d.csstransitions.js-nav & .submenu-wrapper, | |
.csstransforms3d.csstransitions.js-nav & .submenu-wrapper.active, | |
.csstransforms3d.csstransitions.js-nav & .subnav{ | |
@include transform(none); | |
@include transition(none); | |
} | |
.csstransforms3d.csstransitions & .menus{ | |
@include backface-visibility(visible); | |
} | |
.menu{ | |
a{ | |
display: inline-block; | |
border:none; | |
padding:0 1em; | |
/*&:after{ | |
color: #8A191E; | |
content: '\00B7'; | |
font-size: 2em; | |
vertical-align: middle; | |
padding-left:18px; | |
}*/ | |
&:hover:after{ | |
display: none; | |
} | |
} | |
.back, .title{ | |
display: none; | |
} | |
li{ | |
&:hover{ | |
background: #972228; | |
color:#FFF; | |
} | |
} | |
} | |
.expanded { | |
position: relative; | |
// Workaround pro IE8 que não respeita a opacidade do item pai quando | |
// um elemento filho está posicionado relativamente. | |
.two-menus & .menus > .root { | |
position: static; | |
} | |
.js-nav .two-menus & .menus > .root { | |
position: relative; | |
} | |
} | |
.expanded:hover .submenu-wrapper{ | |
display: block; | |
} | |
.expanded:before{ | |
display: none; | |
} | |
//a.first:before{ display: none; } | |
.submenu{ | |
} | |
.submenu-wrapper{ | |
display: none; | |
top: 39px; // Altura do Header | |
left: 0; | |
background: #972228; | |
z-index: 50; | |
position: absolute; | |
width: 14em; | |
//padding: 25px 0 20px; | |
//border-bottom:2px solid #EBEBEB; | |
@include opacity(1); | |
li{ | |
display: block; | |
//float: left; | |
//width:25%; | |
//text-align: center; | |
line-height: 1.7em; | |
//margin: 10px 0; | |
} | |
ul.menu{ | |
margin: 0 auto; | |
display: block; | |
} | |
} | |
.active-trail a{ | |
//background: #FFF; | |
color:#C5242B; | |
font-weight: 800; | |
&:after{ | |
display: none; | |
} | |
} | |
.menu li li a, .block-og-menu li a{ | |
padding: em(10px) 1em; | |
// font: normal 600 #{0.9em/2em} $sans; | |
padding: 0.625em 1em; | |
font-size: 0.88em; | |
font-weight: 400; | |
height: auto; | |
} | |
.menu li li a { | |
display: block; | |
color: #fff; | |
&:hover { | |
background: #B22930; | |
//color: #C5242B; | |
} | |
} | |
.block-og-menu { | |
li{ | |
a { | |
font: normal 600 #{0.9em/2em} $sans; | |
color: #333; | |
} | |
li{ | |
a { | |
font-size: 0.8em; | |
padding: 1em 1em; | |
font-weight: 400; | |
letter-spacing: em(-1px); | |
&:hover{ | |
background: #C5242A; | |
color: #fff; | |
} | |
} | |
} | |
&:hover{ | |
background: none; | |
> a{ | |
color: #C5242B; | |
} | |
} | |
} | |
ul li.active-trail li a { | |
&:hover { | |
background: #B22930; | |
color: #fff; | |
} | |
} | |
} | |
li li.active-trail a { | |
//background: none; | |
color: #fff; | |
} | |
} | |
} | |
.li-busca{ | |
display: none; | |
@include breakpoint($desktop){ | |
display: inline; | |
height: em(40px); | |
} | |
&.active-trail a:hover:before{ | |
color: #FFF; | |
} | |
} | |
#link-busca{ | |
@extend .icon-lupa; | |
width: 48px; | |
padding: 0; | |
height: em(40px); | |
overflow: hidden; | |
color: transparent; | |
//font-size: 0; | |
text-align: center; | |
&:before{ | |
color: #FFF; | |
font-size: 15px; | |
line-height: em(40px); | |
margin: 0; | |
padding: 0; | |
} | |
&.active:before { | |
color: #C5242B; | |
} | |
} | |
/////////////////////////// | |
// Busca | |
/////////////////////////// | |
#search-block-form{ | |
display: block; | |
width: 100%; | |
background-color: #6D1F23; | |
.form-item{ | |
margin: 0; | |
} | |
.form-search { | |
line-height: 1; | |
height:100%; | |
width:100%; | |
padding:0.75em 1em; | |
position: relative; | |
@include box-sizing(border-box); | |
background: transparent; | |
color:#FFF; | |
font-size: em(18px); | |
font-style: normal; | |
font-weight: 600; | |
border:none; | |
@include input-placeholder { | |
color: #FFF; | |
font-style: italic; | |
} | |
} | |
.form-actions{ | |
display: none; | |
margin-left: -36px; | |
@include breakpoint($desktop) { | |
display: inline; | |
} | |
} | |
.form-submit{ | |
display: none; | |
} | |
@include breakpoint($desktop) { | |
background: #fff; | |
border-bottom: 2px solid #EBEBEB; | |
height: 150px; | |
display: none; | |
top: 40px; | |
left: 0; | |
position: absolute; | |
z-index: 100; | |
.container-inline { | |
margin: 0 auto; | |
padding-top: 43px; | |
} | |
.form-item { | |
height: 45px; | |
display: block; | |
float: left; | |
width: 800px; | |
} | |
.form-search{ | |
background: #FAFAFA; | |
border:1px solid #D7D7D7; | |
height: 43px; | |
line-height: 43px; | |
padding: 0; | |
text-indent: 20px; | |
color: #999; | |
@include border-radius(6px); | |
@include input-placeholder { | |
color: #999; | |
font-style: italic; | |
font-weight: 500; | |
} | |
} | |
.form-actions{ | |
display: block; | |
margin:0; | |
float: right; | |
height: 45px; | |
} | |
.form-submit{ | |
@include button; | |
display: inline-block; | |
} | |
} | |
.form-type-radios { | |
display: none; | |
} | |
} | |
// Ícone de busca | |
.form-item-search-block-form { | |
@extend .icon-lupa; | |
&:before{ | |
color: #FFF; | |
font-size: 15px; | |
line-height: inherit; | |
position: absolute; | |
right: 1.3em; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment