mapbox-gl-js version
3.20.0
Browser and version
Chrome 146.0.7680.80
Context:
Product: ui library
Stack: React, Typescript, Emotion
Expected behavior
Use :first-of-type instead of :first-child.
Actual behavior
The imported mapbox-gl.css file causes Emotion to log this error to the console:
The pseudo-class ":first-child" is potentially unsafe when doing server-side rendering. Try changing it to ":first-of-type".
The error looks valid. The current version of the mapbox-gl.css file still has that pseudo-selector:
https://github.com/mapbox/mapbox-gl-js/blob/main/src/css/mapbox-gl.css
Link to the demonstration
Link to reproduce
Steps to trigger the unexpected behavior
- Navigate the link above
- Wait for the project to set up
- Open the DevTools's console
- Observe a result
