Skip to content

Commit

Permalink
hover states for icons
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Oct 25, 2024
1 parent 119a689 commit 008d842
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions proxy/js/styles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,18 @@ const imageLayerWithOutline = (id, spriteExpression, layer) => [
id: `${id}_outline`,
...layer,
paint: {
'icon-halo-color': 'white',
'icon-halo-width': 2.0,
'icon-halo-color': ['case',
['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo,
'white',
],
'icon-halo-blur': ['case',
['boolean', ['feature-state', 'hover'], false], 1.0,
0.0,
],
'icon-halo-width': ['case',
['boolean', ['feature-state', 'hover'], false], 3.0,
2.0,
],
},
layout: {
...(layer.layout || {}),
Expand Down

0 comments on commit 008d842

Please sign in to comment.