Skip to content

Instantly share code, notes, and snippets.

@steveh
Created April 8, 2013 04:14
Show Gist options
  • Select an option

  • Save steveh/5334196 to your computer and use it in GitHub Desktop.

Select an option

Save steveh/5334196 to your computer and use it in GitHub Desktop.
$text_alignment_types: (C center) (L left) (R right);
$vertical_alignment_types: (T top) (M middle) (B bottom);
@each $text_alignment_type in $text_alignment_types {
.txt#{nth($text_alignment_type, 1)},
table .txt#{nth($text_alignment_type, 1)},
table tr .txt#{nth($text_alignment_type, 1)} {
text-align: #{nth($text_alignment_type, 2)};
}
}
@each $vertical_alignment_type in $vertical_alignment_types {
.txt#{nth($vertical_alignment_type, 1)},
table .txt#{nth($vertical_alignment_type, 1)},
table tr .txt#{nth($vertical_alignment_type, 1)} {
vertical-align: #{nth($vertical_alignment_type, 2)};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment