Strip down bundled Maplibre CSS
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
https://github.com/plotly/plotly.js/pull/7526 inlines the entire maplibre-gl.css stylesheet into the Plotly.js bundle, to fix the styling of attributions in MapLibre.
This works, but also adds about 45 kB to the bundle size. Plausibly we could slim down the CSS and include only the styles we definitely need.
This file (4 kB) is enough to fix the attribution styling:
However this will require adding a script to parse and subset the CSS which runs as part of the build process.
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
Review PR 7526 and the bundled maplibre-gl.css to identify the attribution styles that must remain. Use the supplied maplibre-gl-attrib.css as the target subset, then add a build-process script that parses and subsets the CSS. Done means the attribution styling still works while the bundle avoids the unnecessary CSS size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- build-system, frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100