Unify mobile styling for Geolocation control to match Mapbox-GL-Geocoder
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
GL-Geocoder and Geolocation are often used together in the same control group. With the latest update to GL-Geocoder, the form field is now `50px` on mobile for easier input selection, providing an awkward layout next to the geolocation control (they match nicely on web).
Solution: Increasing icon size on mobile for easier touch input, and to keep design consistent across components
## Design Alternatives
Add mobile-first styling so the control is 40-50px on smaller screens, and/or modify GL-Geocoder to match at some middle ground.
Alternatives: Regress and remove mobile styling from gl-geocoder component, do nothing
## Design
Increase `mapboxgl-ctrl-icon` size. Drawbacks: 50px could be too large with many icons.
### Mock-Up
Current web:

Current mobile:

Some possible alternatives:
Button size `50px`

`background-size: contain`

`background-size: 80%`

### Concepts
### Implementation
Mobile-first css changes for `mapboxgl-ctrl-icon` to increase size
n/a
cc @alianthes @scottsfarley93
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the mobile-first CSS rules for `mapboxgl-ctrl-icon` and compare them with the mobile sizing used by Mapbox GL Geocoder. Adjust the geolocation control sizing for touch input while preserving the web layout, then verify the control alongside the geocoder at mobile and desktop widths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100