Skip to content

Instantly share code, notes, and snippets.

@mrpaulphan
Last active September 28, 2016 21:24
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 mrpaulphan/a8c0a256440bb62a58083aef84de7f37 to your computer and use it in GitHub Desktop.
Save mrpaulphan/a8c0a256440bb62a58083aef84de7f37 to your computer and use it in GitHub Desktop.
// Variables
$spacingDesktop: 20px;
$spacingMobile: 14px;
// Default
[spacing^="1"] > * + * {
margin-top: $spacingMobile;
@include media('>large') {
margin-top: $spacingDesktop;
}
}
[spacing^="1.5"] > * + * {
margin-top: $spacingMobile * 1.5;
@include media('>large') {
margin-top: $spacingDesktop * 1.5;
}
}
[spacing^="2"] > * + * {
margin-top: $spacingMobile * 2;
@include media('>large') {
margin-top: $spacingDesktop * 2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment