ESPTrainer built with Meteor and React

_gradient.scss 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. @mixin gradient($one, $two, $direction) {
  2. $deg: if($direction == 'top', 45deg, -45deg);
  3. $word: if($direction == 'top', bottom, top);
  4. $opposite: if($direction == 'top', top, bottom);
  5. background: $one;
  6. background: -moz-linear-gradient($deg, $one 0%, $two 100%);
  7. background: -webkit-gradient(left $word, right $opposite, color-stop(0%, $one), color-stop(100%, $two));
  8. background: -webkit-linear-gradient($deg, $one 0%, $two 100%);
  9. background: -o-linear-gradient($deg, $one 0%, $two 100%);
  10. background: -ms-linear-gradient($deg, $one 0%, $two 100%);
  11. background: linear-gradient($deg, $one 0%, $two 100%);
  12. filter: progid:DXImageTransform.Microsoft.gradient(
  13. startColorstr='#{ie_hex_str($one)}',
  14. endColorstr='#{ie_hex_str($two)}',
  15. GradientType=1
  16. );
  17. }
  18. @mixin linear-gradient($color) {
  19. $lighten: lighten($color, 10);
  20. background: $color;
  21. background: -moz-linear-gradient(top, $color 0%, $lighten 100%);
  22. background: -webkit-linear-gradient(top, $color 0%, $lighten 100%);
  23. background: linear-gradient(to bottom, $color 0%, $lighten 100%);
  24. filter: progid:DXImageTransform.Microsoft.gradient(
  25. startColorstr='#{ie_hex_str($color)}',
  26. endColorstr='#{ie_hex_str($lighten)}',
  27. GradientType=0
  28. );
  29. }
  30. @mixin radial-gradient($color) {
  31. $lighten: lighten($color, 35);
  32. background: $lighten;
  33. background: -moz-radial-gradient(center, ellipse cover, $lighten 0%, $color 100%);
  34. background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $lighten), color-stop(100%, $color));
  35. background: -webkit-radial-gradient(center, ellipse cover, $lighten 0%, $color 100%);
  36. background: -o-radial-gradient(center, ellipse cover, $lighten 0%, $color 100%);
  37. background: -ms-radial-gradient(center, ellipse cover, $lighten 0%, $color 100%);
  38. background: radial-gradient(ellipse at center, $lighten 0%, $color 100%);
  39. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie_hex_str($lighten)}', endColorstr='#{ie_hex_str($color)}', GradientType=1 );
  40. }
  41. @mixin rainbow-gradient() {
  42. background: cyan; /* For browsers that do not support gradients */
  43. background: -webkit-linear-gradient(left, cyan, blue, green, yellow, orange, red, violet); /* For Safari 5.1 to 6.0 */
  44. background: -o-linear-gradient(right, cyan, blue, green, yellow, orange, red, violet); /* For Opera 11.1 to 12.0 */
  45. background: -moz-linear-gradient(right, cyan, blue, green, yellow, orange, red, violet); /* For Firefox 3.6 to 15 */
  46. background: linear-gradient(to right, cyan, blue, green, yellow, orange, red, violet); /* Standard syntax (must be last) */
  47. }