_meters.scss 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Meters
  2. // Credit: https://css-tricks.com/html5-meter-element/
  3. .meter {
  4. appearance: none;
  5. background: $bg-color;
  6. border: 0;
  7. border-radius: $border-radius;
  8. display: block;
  9. width: 100%;
  10. height: $unit-4;
  11. &::-webkit-meter-inner-element {
  12. display: block;
  13. }
  14. &::-webkit-meter-bar,
  15. &::-webkit-meter-optimum-value,
  16. &::-webkit-meter-suboptimum-value,
  17. &::-webkit-meter-even-less-good-value {
  18. border-radius: $border-radius;
  19. }
  20. &::-webkit-meter-bar {
  21. background: $bg-color;
  22. }
  23. &::-webkit-meter-optimum-value {
  24. background: $success-color;
  25. }
  26. &::-webkit-meter-suboptimum-value {
  27. background: $warning-color;
  28. }
  29. &::-webkit-meter-even-less-good-value {
  30. background: $error-color;
  31. }
  32. &::-moz-meter-bar,
  33. &:-moz-meter-optimum,
  34. &:-moz-meter-sub-optimum,
  35. &:-moz-meter-sub-sub-optimum {
  36. border-radius: $border-radius;
  37. }
  38. &:-moz-meter-optimum::-moz-meter-bar {
  39. background: $success-color;
  40. }
  41. &:-moz-meter-sub-optimum::-moz-meter-bar {
  42. background: $warning-color;
  43. }
  44. &:-moz-meter-sub-sub-optimum::-moz-meter-bar {
  45. background: $error-color;
  46. }
  47. }