_progress-bars.scss 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Foundation by ZURB
  2. // foundation.zurb.com
  3. // Licensed under MIT Open Source
  4. @import "global";
  5. //
  6. // @variables
  7. //
  8. $include-html-media-classes: $include-html-classes !default;
  9. // We use this to set the progress bar height
  10. $progress-bar-height: rem-calc(25) !default;
  11. $progress-bar-color: $vapor !default;
  12. // We use these to control the border styles
  13. $progress-bar-border-color: scale-color($white, $lightness: 20%) !default;
  14. $progress-bar-border-size: 1px !default;
  15. $progress-bar-border-style: solid !default;
  16. $progress-bar-border-radius: $global-radius !default;
  17. // We use these to control the margin & padding
  18. $progress-bar-pad: rem-calc(2) !default;
  19. $progress-bar-margin-bottom: rem-calc(10) !default;
  20. // We use these to set the meter colors
  21. $progress-meter-color: $primary-color !default;
  22. $progress-meter-secondary-color: $secondary-color !default;
  23. $progress-meter-success-color: $success-color !default;
  24. $progress-meter-alert-color: $alert-color !default;
  25. // @mixins
  26. //
  27. // We use this to set up the progress bar container
  28. @mixin progress-container {
  29. background-color: $progress-bar-color;
  30. height: $progress-bar-height;
  31. border: $progress-bar-border-size $progress-bar-border-style $progress-bar-border-color;
  32. padding: $progress-bar-pad;
  33. margin-bottom: $progress-bar-margin-bottom;
  34. }
  35. // @mixins
  36. //
  37. // $bg - Default: $progress-meter-color || $primary-color
  38. @mixin progress-meter($bg:$progress-meter-color) {
  39. background: $bg;
  40. height: 100%;
  41. display: block;
  42. }
  43. @include exports("progress-bar") {
  44. @if $include-html-media-classes {
  45. /* Progress Bar */
  46. .progress {
  47. @include progress-container;
  48. // Meter
  49. .meter {
  50. @include progress-meter;
  51. }
  52. &.secondary .meter { @include progress-meter($bg:$progress-meter-secondary-color); }
  53. &.success .meter { @include progress-meter($bg:$progress-meter-success-color); }
  54. &.alert .meter { @include progress-meter($bg:$progress-meter-alert-color); }
  55. &.radius { @include radius($progress-bar-border-radius);
  56. .meter { @include radius($progress-bar-border-radius - 1); }
  57. }
  58. &.round { @include radius(1000px);
  59. .meter { @include radius(999px); }
  60. }
  61. }
  62. }
  63. }