Skip to content

Instantly share code, notes, and snippets.

@benbayard
Last active August 29, 2015 14:00
Show Gist options
  • Save benbayard/545be41d57df841b2b45 to your computer and use it in GitHub Desktop.
Save benbayard/545be41d57df841b2b45 to your computer and use it in GitHub Desktop.
More Sexy Sass
%dot {
border: {
radius: 100%;
}
background: $body-background-color;
}
@mixin make-dot($size) {
height: $size;
width: $size;
}
$bar-types: "body", "liveliness";
$item-count: 5;
@each $bar-type in $bar-types {
.#{$bar-type}-0 {
display: none;
}
@for $count from 1 through $item-count {
.coffee-#{$bar-type}-image-#{$count} {
&:after {
left: $count / $item-count * 100%;
}
}
}
}
.coffee-bar {
position: relative;
&:after {
content:" ";
display: block;
@include sprites-filter-bean;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
}
}
.container-dots {
display: -webkit-box;
display: -webkit-flex;
-webkit {
align-items: center;
justify-content: center;
box-align: center;
}
margin: 10px 0px;
.item {
-webkit: {
flex: 1;
box-flex: 1;
}
}
}
.small-dot {
@extend %dot;
@include make-dot(5px);
}
.large-dot {
@extend %dot;
@include make-dot(8px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment