CSS3 mixins


SUBMITTED BY: Guest

DATE: Jan. 15, 2014, 11:21 p.m.

FORMAT: Text only

SIZE: 2.4 kB

HITS: 750

  1. /*****
  2. SCSS CSS 3 Property Maxin v 0.1
  3. by Dele O
  4. *******/
  5. @mixin rounded($radius: 10px) {
  6. border-radius: $radius;
  7. -moz-border-radius: $radius;
  8. -webkit-border-radius: $radius;
  9. }
  10. @mixin roundedSides($topLeft, $topRight, $bottomRight, $bottomLeft) {
  11. -moz-border-radius-topleft: $topLeft;
  12. -moz-border-radius-topright: $topRight;
  13. -moz-border-radius-bottomright: $bottomRight;
  14. -moz-border-radius-bottomleft: $bottomLeft;
  15. border-top-left-radius:$topLeft;
  16. border-top-right-radius: $topRight;
  17. border-bottom-right-radius: $bottomRight;
  18. border-bottom-left-radius: $bottomLeft;
  19. }
  20. @mixin shadow( $off-y, $off-x, $blur, $color){
  21. -moz-box-shadow: $off-y $off-x $blur $color; /* FF3.5+ */
  22. -webkit-box-shadow: $off-y $off-x $blur $color; /* Saf3.0+, Chrome */
  23. box-shadow: $off-y $off-x $blur $color; /* Opera 10.5, IE9 */
  24. }
  25. @mixin gradient($baseColor, $toColor){
  26. background-color:$baseColor;
  27. background-image: -moz-linear-gradient(top, $baseColor, $toColor); /* FF3.6 */
  28. background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0, $baseColor),color-stop(1, $toColor)); /* Saf4+, Chrome */
  29. background-image: linear-gradient(top,$baseColor, $toColor);
  30. filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='$baseColor', EndColorStr='$toColor'); /* IE6�IE9 */
  31. }
  32. @mixin trasition($property, $duration:0.3s, $function: ease-out){
  33. -moz-transition: $property $durations $function; /* FF3.7+ */
  34. -o-transition: $property $durations $function; /* Opera 10.5 */
  35. -webkit-transition: $property $durations $function; /* Saf3.2+, Chrome */
  36. transition: $property $durations $function;
  37. }
  38. @mixin transform($scale, $rotate, $trans-x, $trans-y, $skew-x, $skew-y){
  39. -moz-transform: scale($scale) rotate($rotate) translate($trans-x, $trans-y) skew(skew-x, skew-y);
  40. -webkit-transform: scale($scale) rotate($rotate) translate($trans-x, $trans-y) skew(skew-x, skew-y);
  41. -o-transform: scale($scale) rotate($rotate) translate($trans-x, $trans-y) skew(skew-x, skew-y);
  42. -ms-transform: scale($scale) rotate($rotate) translate($trans-x, $trans-y) skew(skew-x, skew-y);
  43. transform: scale($scale) rotate($rotate) translate($trans-x, $trans-y) skew(skew-x, skew-y);
  44. }

comments powered by Disqus