Skip to content

Commit

Permalink
patch: use greyscale rather than transparency
Browse files Browse the repository at this point in the history
Otherwise multiple semi-transparent icons can stack and create icons
that don't appear to be transparent.
  • Loading branch information
acheronfail committed Oct 7, 2024
1 parent 0a1a254 commit fae1939
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Map.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
if (el && typeof el.dataset.index === 'string') {
const index = parseInt(el.dataset.index);
if (index > selectedRowIndex) {
el.classList.add('opaque');
el.classList.add('greyscale');
} else {
el.classList.remove('opaque');
el.classList.remove('greyscale');
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ hr {
left: -15px;
}

.opaque {
opacity: 0.2;
.greyscale {
filter: grayscale(1);
}

/* state icons */
Expand Down

0 comments on commit fae1939

Please sign in to comment.