Instantly share code, notes, and snippets.
-
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 Vennik/5121fb70fd7e9cf3315d to your computer and use it in GitHub Desktop.
Arrows
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
/* Transition */ | |
.transition (...) { | |
-webkit-transition: @arguments; | |
-ms-transition: @arguments; | |
transition: @arguments; | |
} | |
@media (min-width: 768px) { | |
.header { | |
position: relative; | |
z-index: 10; | |
} | |
.header .header-bottom ul.menu > li.has-children > span > span > a { | |
color: #474747; | |
text-decoration: none; | |
padding: 15px 30px 15px 15px; | |
@media (max-width: 1064px) { | |
padding-top: 10px; | |
padding-bottom: 10px; | |
} | |
max-height: 50px; | |
display: block; | |
vertical-align: middle; | |
-webkit-transition: color 0.2s linear; | |
-moz-transition: color 0.2s linear; | |
-ms-transition: color 0.2s linear; | |
-o-transition: color 0.2s linear; | |
transition: color 0.2s linear; | |
position: relative; | |
z-index: 9; | |
&:active { | |
color: #ae162a !important; | |
} | |
&:before, &:after { | |
right: 15px; | |
.transition(transform .2s, -webkit-transform .2s, -ms-transform .2s;); | |
} | |
-webkit-border-top-left-radius: 5px; | |
-webkit-border-top-right-radius: 5px; | |
-moz-border-radius-topleft: 5px; | |
-moz-border-radius-topright: 5px; | |
border-top-left-radius: 5px; | |
border-top-right-radius: 5px; | |
} | |
.header .header-bottom ul.menu > li.has-children.hover > span > span > a { | |
background: #fff; | |
color: #db1c35; | |
&:before, &:after { | |
-ms-transform: rotate(180deg); | |
-webkit-transform: rotate(180deg); | |
transform: rotate(180deg); | |
} | |
} | |
.header .header-bottom ul.menu > li > span { | |
display: table-cell; | |
vertical-align: middle; | |
} | |
.header .header-bottom ul.menu > li > span > span { | |
display: block; | |
margin: 0 -16px 0; | |
border: 1px solid transparent; | |
border-bottom: none; | |
position: relative; | |
z-index: 9; | |
-webkit-border-top-left-radius: 5px; | |
-webkit-border-top-right-radius: 5px; | |
-moz-border-radius-topleft: 5px; | |
-moz-border-radius-topright: 5px; | |
border-top-left-radius: 5px; | |
border-top-right-radius: 5px; | |
} | |
.header .header-bottom ul.menu > li.hover > span > span { | |
border-color: #b0b0b0; | |
} | |
@media (max-width: 1100px) { | |
.header .header-bottom ul.menu > li.has-children > span > span a { | |
padding-right: 25px; | |
padding-left: 10px; | |
&:before, &:after { | |
right: 10px; | |
} | |
} | |
.header .header-bottom ul.menu > li > span > span { | |
margin-right: -11px; | |
margin-left: -11px; | |
} | |
} | |
body div.header div.header-bottom li.has-children { | |
position: relative; | |
&.hover { | |
z-index: 12; | |
} | |
&.hover .submenu { | |
display: block !important; | |
} | |
.submenu { | |
text-align: left; | |
position: absolute; | |
margin-right: -10000px; | |
top: 100%; | |
min-width: 110%; | |
max-width: 250px; | |
margin-top: -1px; | |
left: -1px; | |
list-style: none; | |
padding: 7px 20px; | |
font: 14px/20px 'museo500'; | |
background: #fff; | |
border: 1px solid #b0b0b0; | |
-webkit-border-radius: 5px; | |
-webkit-border-top-left-radius: 0; | |
-moz-border-radius: 5px; | |
-moz-border-radius-topleft: 0; | |
border-radius: 5px; | |
border-top-left-radius: 0; | |
li { | |
padding: 7px 0; | |
position: relative; | |
a { | |
padding-left: 20px !important; | |
&:before, &:after { | |
width: 9px !important; // arrow width | |
height: 7px !important; // arrow height | |
position: absolute !important; | |
left: 0 !important; | |
top: 50% !important; | |
margin-top: -4px !important; // half arrow height | |
} | |
&:before { | |
background-position: -16px 0 !important; // new background postion and/or background | |
} | |
&:after { | |
opacity: 0 !important; | |
background-position: -25px 0 !important; // new background postion and/or background | |
} | |
&:before, &:after { | |
right: auto; | |
left: 0; | |
.transition(transform .2s, -webkit-transform .2s, -ms-transform .2s, opacity .2s;) !important; | |
-ms-transform: rotate(0deg); // possible start rotation (probably +/- 90 degree) | |
-webkit-transform: rotate(0deg); | |
transform: rotate(0deg); | |
} | |
color: #474747; | |
@media (min-width: 1065px) { | |
&:hover { | |
color: #db1c35; | |
&:after { | |
opacity: 1 !important; | |
} | |
&:before, &:after { | |
-ms-transform: rotate(180deg); // possible end rotation 180 diff with start rotation | |
-webkit-transform: rotate(180deg); | |
transform: rotate(180deg); | |
} | |
} | |
} | |
&:active { | |
color: #ae162a !important; | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment