Q:

CartoCSS layer visibility

I am working in TileMill and I have a number of layers in two different levels of detail. I have assigned classes to the layers "highdetail" and "lowdetail", and I know how to use the zoom selector - now how can I hide all the low detail layers when zoomed in past e.g. zoom level 6?
The layers are a mix of polygon/raster/line.

A:

You can use opacity instead of display:none;
#idToHide[zoom=6] {

  polygon-opacity: 0;
  raster-opacity: 0;
  line-opacity: 0;
  text-opacity: 0;

}

source: https://www.mapbox.com/carto/api/2.3.0

