_mixins.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. %left_border_radius {
  2. border-radius: 10px 0 0 0;
  3. }
  4. %clearFix {
  5. &:before,
  6. &:after {
  7. clear: both;
  8. display: block;
  9. content: '';
  10. }
  11. }
  12. @mixin keyframes($name) {
  13. @-webkit-keyframes #{$name}{
  14. @content;
  15. }
  16. @-moz-keyframes #{$name} {
  17. @content;
  18. }
  19. @-ms-keyframes #{$name} {
  20. @content;
  21. }
  22. @keyframes #{$name} {
  23. @content;
  24. }
  25. }
  26. @mixin filter($filter-type,$filter-amount) {
  27. -webkit-filter: $filter-type+unquote( '(#{$filter-amount})');
  28. -moz-filter: $filter-type+unquote( '(#{$filter-amount})');
  29. -ms-filter: $filter-type+unquote( '(#{$filter-amount})');
  30. -o-filter: $filter-type+unquote( '(#{$filter-amount})');
  31. filter: $filter-type+unquote( '(#{$filter-amount})');
  32. }
  33. @mixin animation($animation...) {
  34. -o-animation: $animation;
  35. -moz-animation: $animation;
  36. -webkit-animation: $animation;
  37. animation: $animation;
  38. }
  39. @include keyframes(brightnessOff) {
  40. 0% {
  41. @include filter(brightness, $__themeImg-brightness-max);
  42. }
  43. 100% {
  44. @include filter(brightness, $__themeImg-brightness-min);
  45. }
  46. }
  47. @include keyframes(brightnessOn) {
  48. 0% {
  49. @include filter(brightness, $__themeImg-brightness-min);
  50. }
  51. 100% {
  52. @include filter(brightness, $__themeImg-brightness-max);
  53. }
  54. }