Auto-prefix en Sass

5/Mar/2014 11477

Utilizar pre-procesadores CSS se ha vuelto una necesidad en la actualidad, ya que sus múltiples ventajas hacen que no exista excusa para seguir escribiendo CSS puro. Lo mejor es que no intervenimos el lenguaje, sólo lo escribimos más eficiente.

Ahora les presento un útil mixin para Sass que ayuda a lidiar con los prefijos propietarios de algunas propiedades CSS3. Mientras de a poco los fabricantes de browsers los van eliminando, aún tenemos que utilizarlos por compatibilidad retroactiva.

Mixin:

$prefixes: "webkit", "moz", "ms", "o", "none";
@mixin prefix($property, $arguments) {
 @each $prefix in $prefixes {
   @if $prefix == "none" {
     #{$property}: $arguments;
   } @else {
     -#{$prefix}-#{$property}: $arguments;
   } 
 }
}

Uso:

elemento {
  @include prefix(propiedad, valor);
}

En el browser renderiza:

elemento {
  -webkit-propiedad: valor;
  -moz-propiedad: valor;
  -ms-propiedad: valor;
  -o-propiedad: valor;
  propiedad: valor;
}

Comentarios

  1. accutane side effects [#]

    https://tretivaisotretinoin.com/ side effects of accutane

  2. ivermectin 12 mg [#]

    Global Information Fro this offshoot
    https://ivermectinsts.com ivermectin tablets
    https://ivermectinstrom.com ivermectin 6 mg
    https://ivermectinsts.com ivermectin over the counter
    https://ivermectstromect.com stromectol
    https://ivermectinstrom.com ivermectin over the counter

  3. ivermectin for sale for humans [#]

    Accustomed Dope Here this offshoot
    https://ivermectinst.com ivermectin 6 mg
    https://ivermectinstrom.com ivermectin for sale
    https://ivermectstromect.com ivermectin for human tablets
    https://ivermectstromect.com ivermectin 6 mg
    https://ivermectinsts.com ivermectin for human tablets

  4. stromectolforte.com [#]

    ivermectin over the counter https://stromectolforte.com/# ivermectin ivermectin 12 mg tablets for sale

  5. Booblabs [#]

    sildenafil 100mg mexico

  6. cost of ivermectin medicine [#]

    dr pierre kory ivermectin http://stromectolforte.com/ how to buy ivermectin ivermectin

  7. Joshuawag [#]

    viagra fast delivery latest granuflo updates ultimate mojo herbal viagra liquid cialis men’s sexual health and wellness price of viagra in mexico daily viagra or cialis

  8. Joshuawag [#]

    bayer aspirin samples for physicians revatio 20 mg for ed can you buy cialis alternatives to flomax drug viagra for women fda approved

  9. ivermectin for sale [#]

    Accustomed Dope Fro this outcome
    https://ivermectinstrom.com ivermectin over the counter
    https://ivermectinstrom.com ivermectin for sale
    https://stromectolivermect.com ivermectin for sale
    https://ivermectstromect.com ivermectin over the counter
    https://ivermectinstrom.com stromectol

  10. bactrim generic name [#]

    sulfamethoxazole/trimethoprim 800/160 Sulfamethoxazole tmp ds tablet

  11. ivermectin tablets for humans for sale [#]

    General Dope Here this outcome
    https://ivermectinst.com ivermectin 3 mg
    https://ivermectinstrom.com stromectol
    https://stromectolivermect.com ivermectin tablets over counter
    https://ivermectinst.com ivermectin over the counter
    https://ivermectinst.com ivermectin for sale

  12. FritzPeerb [#]

    tadalafil 20 mg prices what are side effects of tamsulosin where to purchase cialis most endowed man natural herbs for women’s libido fda classes of drugs

  13. FritzPeerb [#]

    prescription drug cost lookup fda drug approval process grapefruit juice and medications cialis official site fda drug approval process pdf kroger customer complaints

  14. ivermectin 12 mg [#]

    Global Dope About this outcome
    https://ivermectinsts.com ivermectin for sale
    https://ivermectinstrom.com ivermectin tablets
    https://stromectolivermect.com ivermectin for sale
    https://ivermectinsts.com ivermectin 12 mg
    https://ivermectstromect.com ivermectin 6 mg

  15. ivermectin 6 mg [#]

    Non-specific Information Here this by-product
    https://ivermectinsts.com ivermectin for humans pills 12 mg
    https://ivermectinstrom.com ivermectin over the counter
    https://ivermectinstrom.com ivermectin for humans
    https://stromectolivermect.com ivermectin 6 mg
    https://stromectolivermect.com ivermectin for sale for humans

  16. canadian pharmacy checker [#]

    world pharmacy rx

  17. ivermectin 12 mg [#]

    Global Message Fro this by-product
    https://ivermectstromect.com 3 mg ivermectine over counter
    https://ivermectstromect.com ivermectin 3 mg
    https://ivermectinst.com ivermectin tablets for humans for sale
    https://ivermectinst.com ivermectin for sale
    https://ivermectstromect.com ivermectin over the counter

  18. Joshuawag [#]

    dangers of viagra use sildenafil 100mg for sale cialis 10 mg tablet sildenafil 100 mg tablet cost cialis for men homeopathic medicine for erectile dysfunction

  19. ivermectin 6 mg [#]

    General Dope Fro this by-product
    https://stromectolivermect.com ivermectin for sale
    https://ivermectstromect.com ivermectin tablets for sale
    https://ivermectinsts.com ivermectin 12 mg
    https://ivermectinstrom.com ivermectin tablets
    https://ivermectinstrom.com ivermectin tablets

  20. ivermectin for sale [#]

    Accustomed Information Here this product
    https://stromectolivermect.com ivermectin 3 mg
    https://stromectolivermect.com ivermectin tablets
    https://ivermectinst.com stromectol
    https://ivermectinsts.com ivermectin 12 mg
    https://ivermectinsts.com ivermectin tablets

  21. ivermectin tablets for sale [#]

    Accustomed Information Far this product
    https://ivermectinsts.com 3 mg ivermectine over counter
    https://stromectolivermect.com ivermectin for humans
    https://stromectolivermect.com ivermectin 6 mg
    https://ivermectstromect.com stromectol
    https://ivermectinstrom.com ivermectin tablets

  22. quando assumere cialis 5 mg [#]

    It’s going to be finish of mine day, but before ending I am
    reading this impressive article to increase my know-how.

    https://comprarcialis5mg.org/it/
    quando assumere cialis 5 mg https://comprarcialis5mg.org/it/

  23. quando assumere cialis 5 mg [#]

    It’s going to be finish of mine day, but before ending I am reading this impressive article to increase my know-how.

    https://comprarcialis5mg.org/it/
    quando assumere cialis 5 mg https://comprarcialis5mg.org/it/

  24. buy cialis overnight shipping [#]

    I blog often and I genuinely thank you for your content.
    The article has truly peaked my interest. I will
    bookmark your website and keep checking for new information about once per week.
    I subscribed to your Feed as well. http://ciaalis2u.com/

CSSLab