Skip to content

Instantly share code, notes, and snippets.

@jdlich
Created August 15, 2014 00:11
Show Gist options
  • Save jdlich/29bf8fea064b74f48c56 to your computer and use it in GitHub Desktop.
Save jdlich/29bf8fea064b74f48c56 to your computer and use it in GitHub Desktop.
Responsive alignment classes for Zurb Foundation. Comes in handy when you need to center simple content on the small screens such as footer links.
@mixin breakpoint($point) {
@if $point == "medium" {
@media (min-width: 40.063em) { @content;}
}
@else if $point == "large" {
@media (min-width: 64.063em) { @content;}
}
@else if $point == "xlarge" {
@media (min-width: 90.063em) { @content;}
}
}
.small-center {
text-align: center;
}
.small-right {
float: right;
}
.small-left {
float: left;
}
@include breakpoint("medium") {
.medium-left {
float: left;
}
.medium-right {
float: right;
}
.medium-center {
text-align: center;
}
}
@include breakpoint("large") {
.large-left {
float: left;
}
.large-right {
float: right;
}
.large-center {
text-align: center;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment