Skip to content

Instantly share code, notes, and snippets.

@Anderson-Juhasc
Created August 17, 2012 16:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anderson-Juhasc/3380509 to your computer and use it in GitHub Desktop.
Save Anderson-Juhasc/3380509 to your computer and use it in GitHub Desktop.
Selector Prefix
//
// Selector-prefix
// =================================================
//
// @mixin selector-prefix([$prefix], [$propertie], [$values]);
// cria de maneira fácil @extend-Only Selectors, por exemplo: %fz-10px, %fz-20px, %fz-4em...
//
// uso: @include selector-prefix([$prefixo_dos_seletores], [$propriedade], [$valores]);
// exemplo: @include selector-prefix(mr, margin-right, 4px 10px 18px 1em);
// resultado: %mr-4px, %mr-10px, mr-18px e mr-1em.
//
@mixin selector-prefix($prefix, $propertie, $values) {
@each $value in $values {
// cria os @extend-Only Selectors
%#{$prefix}-#{$value} {
#{$propertie}: $value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment