You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.9 KiB

9 months ago
  1. // Gradients
  2. // scss-docs-start gradient-bg-mixin
  3. @mixin gradient-bg($color: null) {
  4. background-color: $color;
  5. @if $enable-gradients {
  6. background-image: var(--#{$prefix}gradient);
  7. }
  8. }
  9. // scss-docs-end gradient-bg-mixin
  10. // scss-docs-start gradient-mixins
  11. // Horizontal gradient, from left to right
  12. //
  13. // Creates two color stops, start and end, by specifying a color and position for each color stop.
  14. @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
  15. background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
  16. }
  17. // Vertical gradient, from top to bottom
  18. //
  19. // Creates two color stops, start and end, by specifying a color and position for each color stop.
  20. @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
  21. background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
  22. }
  23. @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
  24. background-image: linear-gradient($deg, $start-color, $end-color);
  25. }
  26. @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
  27. background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
  28. }
  29. @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
  30. background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
  31. }
  32. @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
  33. background-image: radial-gradient(circle, $inner-color, $outer-color);
  34. }
  35. @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
  36. background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
  37. }
  38. // scss-docs-end gradient-mixins