Skip to content

Change the layer control icon#144

Merged
giswqs merged 3 commits intomainfrom
icon
Nov 23, 2025
Merged

Change the layer control icon#144
giswqs merged 3 commits intomainfrom
icon

Conversation

@giswqs
Copy link
Copy Markdown
Member

@giswqs giswqs commented Nov 23, 2025

image

Copilot AI review requested due to automatic review settings November 23, 2025 04:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 23, 2025

@github-actions github-actions Bot temporarily deployed to pull request November 23, 2025 04:48 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the layer control icon from a CSS-based design (using box-shadow for stacked lines) to an inline SVG icon representing stacked layers. The change improves visual clarity and robustness across different color schemes.

  • Replaces CSS pseudo-element icon with an inline SVG "layers" glyph
  • Updates CSS to support the new SVG icon and enforce dark icon color
  • Removes the old CSS-based icon implementation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
anymap/static/maplibre_widget.js Adds inline SVG icon markup to the layer control button element
anymap/static/maplibre_widget.css Updates styles to support SVG icon, removes old CSS-based icon, and enforces dark icon color

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread anymap/static/maplibre_widget.js Outdated
justify-content: center;
cursor: default !important;
outline: none;
color: #1f2a37 !important; /* force icon to be dark even if parent sets white */
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded dark color with !important may cause accessibility issues in dark mode themes where a light icon would be more appropriate. Consider using a CSS variable or data attribute to support theme-aware icon colors instead of forcing a dark color.

Copilot uses AI. Check for mistakes.
giswqs and others added 2 commits November 22, 2025 23:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot temporarily deployed to pull request November 23, 2025 04:51 Inactive
@giswqs giswqs merged commit b0d5e57 into main Nov 23, 2025
8 checks passed
@giswqs giswqs deleted the icon branch November 23, 2025 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants