File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,11 @@ export default function App() {
161161 const share = getActivityShare ( bucket , allActivityCount )
162162
163163 return (
164- < li key = { bucket . kind } className = { bucket . kind === selectedKind ? 'selected' : '' } >
164+ < li
165+ key = { bucket . kind }
166+ className = { bucket . kind === selectedKind ? 'selected' : '' }
167+ data-visible = { isVisible }
168+ >
165169 < label className = "bucket-toggle" >
166170 < input
167171 type = "checkbox"
@@ -175,6 +179,9 @@ export default function App() {
175179 < small > { share } %</ small >
176180 </ span >
177181 < span className = "bucket-count" > { bucket . count } </ span >
182+ < span className = "bucket-share-meter" aria-hidden = "true" >
183+ < span style = { { width : `${ share } %` , backgroundColor : bucket . color } } />
184+ </ span >
178185 </ label >
179186 < button
180187 className = "inspect-button"
Original file line number Diff line number Diff line change @@ -284,13 +284,15 @@ input:focus-visible {
284284 min-width : 0 ;
285285 display : grid;
286286 grid-template-columns : 16px 9px minmax (0 , 1fr ) auto;
287- gap : 10px ;
287+ column-gap : 10px ;
288+ row-gap : 5px ;
288289 align-items : center;
289290 padding : 8px 4px 8px 12px ;
290291 cursor : pointer;
291292}
292293
293294.bucket-toggle input {
295+ grid-row : 1 / 3 ;
294296 width : 16px ;
295297 height : 16px ;
296298 margin : 0 ;
@@ -302,6 +304,7 @@ input:focus-visible {
302304}
303305
304306.bucket-swatch {
307+ grid-row : 1 / 3 ;
305308 width : 9px ;
306309 height : 9px ;
307310 border-radius : 50% ;
@@ -334,6 +337,33 @@ input:focus-visible {
334337 font-variant-numeric : tabular-nums;
335338}
336339
340+ .bucket-share-meter {
341+ grid-row : 2 ;
342+ grid-column : 3 / 5 ;
343+ height : 3px ;
344+ overflow : hidden;
345+ border-radius : var (--radius-pill );
346+ background : color-mix (in srgb, var (--color-text ) 8% , transparent);
347+ }
348+
349+ .bucket-share-meter span {
350+ display : block;
351+ height : 100% ;
352+ min-width : 3px ;
353+ border-radius : inherit;
354+ transition : opacity var (--motion-standard );
355+ }
356+
357+ .bucket-list li [data-visible = 'false' ] .bucket-swatch ,
358+ .bucket-list li [data-visible = 'false' ] .bucket-share-meter span {
359+ opacity : 0.24 ;
360+ }
361+
362+ .bucket-list li [data-visible = 'false' ] .bucket-name ,
363+ .bucket-list li [data-visible = 'false' ] .bucket-count {
364+ color : var (--color-subtle );
365+ }
366+
337367.inspect-button ,
338368.stage-actions button {
339369 display : inline-grid;
You can’t perform that action at this time.
0 commit comments