Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix feature outline on hover #919

Open
AliyanH opened this issue Feb 13, 2024 · 1 comment · May be fixed by #957
Open

Fix feature outline on hover #919

AliyanH opened this issue Feb 13, 2024 · 1 comment · May be fixed by #957
Labels
accessibility basic styling Elements should only have basic and native-like styling (W3C TAG Components Guideline) bug

Comments

@AliyanH
Copy link
Member

AliyanH commented Feb 13, 2024

When you hover over the features on the map given below, the outline in some places does not show properly due to overlap, we can get around this with messing with Z-index or dom order for the outline as required to show the outline at the top of DOM order at all times.

https://maps4html.org/experiments/api/geojson/

@AliyanH AliyanH added bug accessibility basic styling Elements should only have basic and native-like styling (W3C TAG Components Guideline) labels Feb 13, 2024
@AliyanH
Copy link
Member Author

AliyanH commented Mar 18, 2024

this issue is related to #940.

It appears SVG doesn't directly support z-index like CSS does (link). I played around by moving the hovered element to the end of its parent container. Since SVGs render the last element in the markup on top, and this seems to solve the issue, but may present another issue when features overlap. For discussion.

@AliyanH AliyanH linked a pull request Apr 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility basic styling Elements should only have basic and native-like styling (W3C TAG Components Guideline) bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant