Mapbox-gl-js: Customizing popups

Created on 28 Dec 2016  路  7Comments  路  Source: mapbox/mapbox-gl-js

I would like to know if it is possible to customize/stylize popups from the var popup = new mapboxgl.Popup() function.

I have tried to reset the popup anchor so it is on the left (as opposed to the bottom) of the popup box in CSS with:

.mapboxgl-popup-anchor-left {
    margin-left: 10px;
}

but to no avail. Is it also possible to change the background color/size of the popup box, x and y overflow, and could an example be provided?