Skip to content

Instantly share code, notes, and snippets.

@rpearce
Created November 12, 2014 16:07
Show Gist options
  • Save rpearce/82b4bf39cc4a132a89db to your computer and use it in GitHub Desktop.
Save rpearce/82b4bf39cc4a132a89db to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
@mixin dimensions($width, $height: 0)
@if $height == 0
width: $width
height: $width
@else
width: $width
height: $height
.avatar
$large: 300px
$medium: 150px
$small: 70px
$mini: 60px
$micro: 40px
border-radius: 50%
&.large
&.medium,
&.small,
&.mini,
&.micro
margin-left: auto
margin-right: auto
&.large
+dimensions($large)
&.medium
+dimensions($medium)
&.small
+dimensions($small)
&.mini
+dimensions($mini)
&.micro
+dimensions($micro)
.avatar {
border-radius: 50%;
}
.avatar.medium, .avatar.small, .avatar.mini, .avatar.micro {
margin-left: auto;
margin-right: auto;
}
.avatar.large {
width: 300px;
height: 300px;
}
.avatar.medium {
width: 150px;
height: 150px;
}
.avatar.small {
width: 70px;
height: 70px;
}
.avatar.mini {
width: 60px;
height: 60px;
}
.avatar.micro {
width: 40px;
height: 40px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment