Shadow DOM?
#1304
Replies: 1 comment
-
Leaking CSS seems to be related to how you build the site around maplibre. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently I've been embedding MapLibre maps in a lot of different websites, and some sites have CSS rules that are too broad and leak in to the MapLibre map and/or controls (attribution being set as
display: none
when it should have been block, for example). Increasing the specificity of the rules seem to help with some sites, but sometimes there are IDs in the CSS and I'll have to use something like!important
or add my own IDs.In more recent sites, I've decided to just wrap the whole map in a Shadow DOM to solve the problem of outside CSS interfering with the map, and that's been working well.
I was wondering if a feature like this would be appropriate to put in to the library itself?
Beta Was this translation helpful? Give feedback.
All reactions