Skip to content

Instantly share code, notes, and snippets.

@angeliquejw
Last active September 24, 2015 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angeliquejw/693444f9ed405f9b3e79 to your computer and use it in GitHub Desktop.
Save angeliquejw/693444f9ed405f9b3e79 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="slider">
<div class="imgWrapper"></div>
<div class="arrow arrowPrev"></div>
<div class="arrow arrowNext"></div>
</div>
<div class="slider">
<div class="imgWrapper">
<img alt="This cat is a placeholder image" src="http://lorempixel.com/g/500/300/cats/" />
</div>
<div class="arrow arrowPrev"></div>
<div class="arrow arrowNext"></div>
</div>
// ----
// libsass (v3.2.5)
// ----
@import 'bourbon/bourbon';
@import url(http://weloveiconfonts.com/api/?family=entypo);
.slider {
margin:20px auto;
position:relative;
width:50%;
}
.imgWrapper {
margin:0 auto;
width:80%;
max-width:500px;
}
.arrowPrev, .arrowNext {
vertical-align:top;
&:hover, &:focus {
cursor:pointer;
opacity:0.6;
}
}
@mixin arrow($direction: right) {
content: '\e766';
font-family: 'entypo', sans-serif;
font-size:36px;
position:absolute;
top:48%;
@if $direction == right {
right:0;
}
@else if $direction == left {
left:0;
@include transform(rotate(180deg));
}
}
.arrowPrev:before { @include arrow(left); }
.arrowNext:before { @include arrow(right); }
@import url(http://weloveiconfonts.com/api/?family=entypo);
.slider {
margin: 20px auto;
position: relative;
width: 50%;
}
.imgWrapper {
margin: 0 auto;
width: 80%;
}
.arrowPrev, .arrowNext {
vertical-align: top;
}
.arrowPrev:hover, .arrowPrev:focus, .arrowNext:hover, .arrowNext:focus {
cursor: pointer;
opacity: 0.6;
}
.arrowPrev:before {
content: '\e766';
font-family: 'entypo', sans-serif;
font-size: 36px;
position: absolute;
top: 48%;
left: 0;
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.arrowNext:before {
content: '\e766';
font-family: 'entypo', sans-serif;
font-size: 36px;
position: absolute;
top: 48%;
right: 0;
}
<div class="slider">
<div class="imgWrapper">
<img alt="This cat is a placeholder image" src="http://lorempixel.com/g/500/300/cats/" />
</div>
<div class="arrow arrowPrev"></div>
<div class="arrow arrowNext"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment