forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits
| 1 | // The time-left bar of a running CI run: the elapsed share of its expected total. It fills with the |
| 2 | // heat colour, the same as the repo home's CI bar, and stays full once the run is past its estimate. |
| 3 | |
| 4 | progress.ci-est { |
| 5 | -webkit-appearance: none; |
| 6 | appearance: none; |
| 7 | flex: 0 0 96px; |
| 8 | box-sizing: border-box; |
| 9 | width: 96px; |
| 10 | height: 4px; |
| 11 | margin: 0; |
| 12 | border: 0; |
| 13 | border-radius: 2px; |
| 14 | overflow: hidden; |
| 15 | background: var(--border); |
| 16 | color: var(--heat-3); |
| 17 | |
| 18 | &::-webkit-progress-bar { |
| 19 | background: var(--border); |
| 20 | } |
| 21 | |
| 22 | &::-webkit-progress-value { |
| 23 | border-radius: 2px; |
| 24 | background: linear-gradient(90deg, var(--heat-2), var(--heat-3), var(--heat-4)); |
| 25 | } |
| 26 | |
| 27 | &::-moz-progress-bar { |
| 28 | border-radius: 2px; |
| 29 | background: linear-gradient(90deg, var(--heat-2), var(--heat-3), var(--heat-4)); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | progress.ci-est-run { |
| 34 | display: block; |
| 35 | flex: none; |
| 36 | width: 100%; |
| 37 | max-width: 320px; |
| 38 | height: 4px; |
| 39 | margin-top: 8px; |
| 40 | } |
| 41 | |
| 42 | // A step's progress: a 2 px bar along the foot of its row. A finished step is full in its state's colour; |
| 43 | // a running one fills to its share of the expected time (the page script moves it). A running step with |
| 44 | // no estimate has no value, so it shows a sliding segment rather than a made-up share. |
| 45 | progress.ci-est.ci-tl-stepprog { |
| 46 | position: absolute; |
| 47 | left: 0; |
| 48 | right: 0; |
| 49 | bottom: 0; |
| 50 | width: 100%; |
| 51 | height: 2px; |
| 52 | flex: none; |
| 53 | margin: 0; |
| 54 | border: 0; |
| 55 | border-radius: 0; |
| 56 | background: transparent; |
| 57 | color: var(--accent); |
| 58 | |
| 59 | &::-webkit-progress-bar { |
| 60 | background: transparent; |
| 61 | border-radius: 0; |
| 62 | } |
| 63 | |
| 64 | &::-webkit-progress-value { |
| 65 | border-radius: 0; |
| 66 | background: var(--border-strong); |
| 67 | } |
| 68 | |
| 69 | &::-moz-progress-bar { |
| 70 | border-radius: 0; |
| 71 | background: var(--border-strong); |
| 72 | } |
| 73 | |
| 74 | // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list. |
| 75 | &.ci-sp-pass::-webkit-progress-value { |
| 76 | background: var(--ok); |
| 77 | } |
| 78 | |
| 79 | &.ci-sp-pass::-moz-progress-bar { |
| 80 | background: var(--ok); |
| 81 | } |
| 82 | |
| 83 | &.ci-sp-fail::-webkit-progress-value { |
| 84 | background: var(--bad); |
| 85 | } |
| 86 | |
| 87 | &.ci-sp-fail::-moz-progress-bar { |
| 88 | background: var(--bad); |
| 89 | } |
| 90 | |
| 91 | // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list. |
| 92 | &.ci-sp-off::-webkit-progress-value { |
| 93 | background: var(--border); |
| 94 | } |
| 95 | |
| 96 | &.ci-sp-off::-moz-progress-bar { |
| 97 | background: var(--border); |
| 98 | } |
| 99 | |
| 100 | // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list. |
| 101 | &.ci-sp-run::-webkit-progress-value { |
| 102 | background: var(--accent); |
| 103 | } |
| 104 | |
| 105 | &.ci-sp-run::-moz-progress-bar { |
| 106 | background: var(--accent); |
| 107 | } |
| 108 | |
| 109 | // No value attribute: the element's own background carries a 30% segment that slides across. |
| 110 | &:not([value]) { |
| 111 | background: linear-gradient(var(--accent), var(--accent)) no-repeat, transparent; |
| 112 | background-size: 30% 100%, auto; |
| 113 | background-position: -43% 0, 0 0; |
| 114 | animation: ci-step-slide 1.4s linear infinite; |
| 115 | |
| 116 | &::-webkit-progress-bar, |
| 117 | &::-webkit-progress-value { |
| 118 | background: transparent; |
| 119 | animation: none; |
| 120 | } |
| 121 | |
| 122 | &::-moz-progress-bar { |
| 123 | background: transparent; |
| 124 | animation: none; |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | @keyframes ci-step-slide { |
| 130 | from { |
| 131 | background-position: -43% 0, 0 0; |
| 132 | } |
| 133 | |
| 134 | to { |
| 135 | background-position: 100% 0, 0 0; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | @media (prefers-reduced-motion: reduce) { |
| 140 | progress.ci-est.ci-tl-stepprog:not([value]) { |
| 141 | animation: none; |
| 142 | background-position: 0 0, 0 0; |
| 143 | } |
| 144 | } |