-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Display some kind of warning if mapbox-gl CSS is is missing #5359
Comments
A random callout but if you're delivering your CSS in JS (e.g. local development with Webpack) the injection of this div causes Mapbox's calculation for determining the canvas size to be thrown off. Not really an issue since you should be generating a CSS bundle in production, but was driving me a little mad (thinking my CSS rules were messed up). Figured I'd call it out in case anyone else goes searching... |
@eltonjuan How did you get around this? V annoying |
@tywoodpav Make sure to reference css link in index.html headers
and load the correct style in mapbox:
as describe in https://www.mapbox.com/install/js/bundler-install/ |
We should somehow issue a warning if the mapbox-gl CSS is missing. As suggested by @nfarina in #4048 (comment), a div added to the map's target element and hidden by our default CSS should do the trick.
The text was updated successfully, but these errors were encountered: