Skip to content
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

NextUI seems to break/clash with Mapbox GL JS #13346

Open
newguy123-creator opened this issue Dec 9, 2024 · 1 comment
Open

NextUI seems to break/clash with Mapbox GL JS #13346

newguy123-creator opened this issue Dec 9, 2024 · 1 comment

Comments

@newguy123-creator
Copy link

newguy123-creator commented Dec 9, 2024

mapbox-gl-js version:3.7.0

browser:Chrome, Forefox, any browser

Steps to Trigger Behavior

  1. Get a working react app with tailwind and mapbox gl js
  2. Add NextUI
  3. Add the NextUi tags, NextUIProvider around the App as per install instrutions

Link to Demonstration

No example

Expected Behavior

App continues working and map displays

Actual Behavior

As soon as App is surrounded by tags, mapbox map no longer displays - everything else works fine, except map no longer visible

@newguy123-creator
Copy link
Author

newguy123-creator commented Dec 10, 2024

Seems I may have resolved the issue, although not sure why!?!
My map container has a tailwind css styling on it "className="h-full w-full bg-[lightgrey]"
If I remove this style, then use the container's id and use regular css in my css file like so:

#map-container {
    width: 100%;
    height: 100vh;
}

...it seems to resolve the issue. Very weird, but it works

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

No branches or pull requests

1 participant