-
-
Save burakcan/106e930ea7c2d29a1105fc8433d7e78c 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
@import '~styles/colors'; | |
@import '~styles/typography'; | |
$timeAndEasing: .75s cubic-bezier(0.75,-0.34, 0.26, 1.21); | |
$expandedWidth: 185px; | |
$collapsedWidth: 80px; | |
.Wrapper { | |
background: $c-nav-bg; | |
flex: 1; | |
&.collapsed {} | |
} | |
.Header { | |
height: 50px; | |
border-bottom: 1px solid $c-nav-border; | |
background: url('../images/logo.png') no-repeat 28px center $c-nav-header-bg; | |
background-size: 130px 25px; | |
position: relative; | |
cursor: pointer; | |
} | |
.SwitchWrapper { | |
height: 50px; | |
border-bottom: 1px solid $c-nav-border; | |
text-align: center; | |
line-height: 50px; | |
position: relative; | |
} | |
.Switch { | |
display: inline-block; | |
width: 40px; | |
height: 19px; | |
border-radius: 40px; | |
background: $c-nav-border; | |
vertical-align: middle; | |
position: relative; | |
transition: opacity 0.6s linear; | |
&:after { | |
content: ''; | |
display: block; | |
width: 15px; | |
height: 15px; | |
border-radius: 15px; | |
background: #ffffff; | |
position: absolute; | |
transition: left .3s cubic-bezier(0.65, 0.05, 0.36, 1); | |
left: 2px; | |
top: 2px; | |
} | |
&.facebook:after { | |
left: 23px; | |
} | |
} | |
.SwitchLabel { | |
position: absolute; | |
width: 50%; | |
height: 100%; | |
top: 0; | |
left: 0; | |
cursor: pointer; | |
background-position: center; | |
background-size: 20px 20px; | |
background-repeat: no-repeat; | |
opacity: .2; | |
transition: opacity .3s ease-out, left $timeAndEasing, width $timeAndEasing; | |
& ~ & { | |
left: 50%; | |
} | |
&:hover { | |
opacity: 0.7; | |
} | |
&.twitter { | |
background-image: url('./images/twitter.svg'); | |
} | |
&.facebook { | |
background-image: url('./images/facebook.svg'); | |
} | |
.facebook &.facebook { | |
opacity: 1; | |
} | |
.twitter &.twitter { | |
opacity: 1; | |
} | |
} | |
.Items a { | |
display: block; | |
color: $c-white; | |
text-decoration: none; | |
font-weight: $fw-semibold; | |
font-size: 11px; | |
} | |
.SubItems { | |
display: none; | |
background: $c-nav-dark-bg; | |
padding-bottom: 10px; | |
padding-left: 64px; | |
box-shadow: inset 4px 0 0 $c-anakiwa-blue; | |
a { | |
line-height: 14px; | |
margin-bottom: 6px; | |
opacity: 0.85; | |
} | |
a.active { | |
color: $c-anakiwa-blue; | |
} | |
} | |
.Items > .Item { // First level items | |
border-bottom: 1px solid $c-nav-border; | |
> a { | |
display: block; | |
height: 50px; | |
line-height: 50px; | |
opacity: 0.85; | |
padding-left: 30px; | |
text-transform: uppercase; | |
.Icon { | |
display: block; | |
vertical-align: middle; | |
float: left; | |
height: 18px; | |
margin-top: 5px; | |
margin-right: 16px; | |
opacity: 0.55; | |
color: $c-white; | |
} | |
&.active { | |
opacity: 1; | |
background: $c-nav-dark-bg; | |
box-shadow: inset 4px 0 0 $c-anakiwa-blue; | |
.Icon { | |
color: $c-anakiwa-blue; | |
opacity: 1; | |
} | |
} | |
&.active ~ .SubItems { | |
display: block; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment