|
| 1 | +.circular-button { |
| 2 | + position: relative; |
| 3 | + width: 70px; |
| 4 | + height: 70px; |
| 5 | + line-height: 70px; |
| 6 | + background: none; |
| 7 | + margin-right: 8px; |
| 8 | + margin-bottom: 8px; |
| 9 | + display: flex; |
| 10 | + justify-content: center; |
| 11 | + align-items: center; |
| 12 | +} |
| 13 | + |
| 14 | +.circular-button:after { |
| 15 | + content: ""; |
| 16 | + width: 100%; |
| 17 | + height: 100%; |
| 18 | + border-radius: 50%; |
| 19 | + border: 5px solid #2b3035; |
| 20 | + position: absolute; |
| 21 | + top: 0; |
| 22 | + left: 0; |
| 23 | +} |
| 24 | + |
| 25 | +.circular-button > span { |
| 26 | + width: 50%; |
| 27 | + height: 100%; |
| 28 | + overflow: hidden; |
| 29 | + position: absolute; |
| 30 | + top: 0; |
| 31 | + z-index: 1; |
| 32 | +} |
| 33 | + |
| 34 | +.circular-button .progress-left { |
| 35 | + left: 0.5px; // fix gap between left and right progress bars |
| 36 | +} |
| 37 | + |
| 38 | +.circular-button .progress-right { |
| 39 | + right: 0.5px; // fix gap between left and right progress bars |
| 40 | +} |
| 41 | + |
| 42 | +.circular-button .progress-bar { |
| 43 | + width: 100%; |
| 44 | + height: 100%; |
| 45 | + background: none; |
| 46 | + border-width: 5px; |
| 47 | + border-style: solid; |
| 48 | + position: absolute; |
| 49 | + top: 0; |
| 50 | +} |
| 51 | + |
| 52 | +.circular-button .progress-left .progress-bar { |
| 53 | + left: 100%; |
| 54 | + border-top-right-radius: 35px; |
| 55 | + border-bottom-right-radius: 35px; |
| 56 | + border-left: 0; |
| 57 | + transform-origin: center left; |
| 58 | +} |
| 59 | + |
| 60 | +.circular-button .progress-right .progress-bar { |
| 61 | + left: -100%; |
| 62 | + border-top-left-radius: 35px; |
| 63 | + border-bottom-left-radius: 35px; |
| 64 | + border-right: 0; |
| 65 | + transform-origin: center right; |
| 66 | +} |
| 67 | + |
| 68 | +.circular-button .button-content { |
| 69 | + width: 80%; |
| 70 | + height: 80%; |
| 71 | + border-radius: 50%; |
| 72 | + background: #2b3035; |
| 73 | + display: flex; |
| 74 | + flex-direction: column; |
| 75 | + justify-content: center; |
| 76 | + align-items: center; |
| 77 | + position: absolute; |
| 78 | + top: 10%; |
| 79 | + left: 10%; |
| 80 | + z-index: 2; |
| 81 | + text-align: center; |
| 82 | +} |
| 83 | + |
| 84 | +.circular-button .button-name { |
| 85 | + font-weight: bold; |
| 86 | + margin-bottom: 2px; |
| 87 | + line-height: 1.2; |
| 88 | +} |
| 89 | + |
| 90 | +.circular-button .button-value { |
| 91 | + font-size: 0.85rem; |
| 92 | + line-height: 1; |
| 93 | +} |
| 94 | + |
| 95 | +.circular-button .progress-bar { |
| 96 | + border-color: #0d6efd; |
| 97 | +} |
| 98 | + |
| 99 | +.circular-button.active .button-content { |
| 100 | + box-shadow: 0 0 10px 3px rgba(13, 110, 253, 0.5); |
| 101 | +} |
0 commit comments