Last active
October 23, 2015 14:37
-
-
Save march213/5cb58c6b5ccf4301039a 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 '../mixins/responsive'; | |
.carousel { | |
&.is-fullscreen { | |
position: fixed; | |
z-index: 100; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
height: auto; | |
width: auto; | |
margin: 0; | |
padding: 0; | |
.carousel-track-btn--left, | |
.carousel-track-btn--right { | |
top: 40%; | |
} | |
.carousel-nav { | |
position: fixed; | |
bottom: 0; | |
border: none; | |
} | |
} | |
&:hover { | |
.carousel-track-btn--left, | |
.carousel-track-btn--right { | |
display: block; | |
} | |
} | |
&-track { | |
position: relative; | |
cursor: pointer; | |
&-container { | |
white-space: nowrap; | |
transition-property: transform; | |
transition-duration: .5s; | |
transition-timing-function: ease; | |
will-change: transform; | |
} | |
&-slide { | |
display: inline-block; | |
height: 100%; | |
width: 100%; | |
img { | |
width: 100%; | |
height: auto; | |
} | |
} | |
&-btn { | |
position: absolute; | |
top: 50%; | |
width: 3.2rem; | |
height: 3.2rem; | |
background-color: rgba(255, 255, 255, .75); | |
border: none; | |
border-radius: .2rem; | |
transform: translateY(-50%); | |
opacity: .9; | |
&:hover { | |
opacity: 1; | |
} | |
&:focus, | |
&:active { | |
outline: none; | |
} | |
&--left { | |
display: none; | |
left: 1rem; | |
} | |
&--right { | |
display: none; | |
right: 1rem; | |
} | |
&--fullscreen { | |
display: none; | |
width: 4.1rem; | |
top: 2.5rem; | |
right: 1rem; | |
@include responsive(md) { | |
display: block; | |
} | |
} | |
&-icon { | |
margin-top: .6rem; | |
width: 100%; | |
height: 1.7rem; | |
fill: rgb(73, 73, 74); | |
} | |
} | |
} | |
&-nav { | |
display: none; | |
position: relative; | |
width: 100%; | |
background-color: #fff; | |
border-bottom: 1px solid #f5f5f5; | |
@include responsive(md) { | |
display: block; | |
} | |
&-container { | |
display: flex; | |
transition-property: transform; | |
transition-duration: .5s; | |
transition-timing-function: ease; | |
will-change: transform; | |
} | |
&-item { | |
min-width: 105px; | |
&.is-active { | |
position: relative; | |
&::after { | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
left: 0; | |
content: ''; | |
background-color: rgba(255, 255, 255, .9); | |
opacity: .5; | |
} | |
} | |
} | |
&-btn { | |
position: absolute; | |
top: 0; | |
width: 20px; | |
height: 100%; | |
background-color: rgba(255, 255, 255, .9); | |
border: none; | |
opacity: .9; | |
&:hover { | |
opacity: 1; | |
} | |
&:focus, | |
&:active { | |
outline: none; | |
} | |
&.is-disabled { | |
display: none; | |
} | |
&--left { | |
left: 0; | |
} | |
&--right { | |
right: 0; | |
} | |
&-icon { | |
fill: rgb(73, 73, 74); | |
width: 100%; | |
height: 100%; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment