dotted lines for tunnels

dotted lines for tunnels

/* Roads, footpaths, tracks */

@private_road_colour: #c02c34;

@tertiary_road_colour:  #faf555;
@secondary_road_colour: #d46833;
@primary_road_colour:   #cc3737;
@trunk_road_colour:     #650f0d;
@motorway_road_colour:  #7c0046;

/* paths (footway, cycleway, track) are dotted, the halo is behind the
   dots */
@path_halo_opacity: 0.3;
@path_halo_colour: white;
@path_dot_opacity: 1.0;

/* highway labels */
@highway_face_name: "Liberation Sans Regular";
@highway_text_fill: white;
@highway_halo_fill: black;
@highway_halo_radius: 2.0;

/*
  service      black
  residential  black
  unclassified black
  tertiary     yellow
  secondary    orange
  primary      red
  trunk        blue
  motorway     dark red
*/

#highway-labels[highway='footway'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='cycleway'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='path'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='track'][zoom > 13] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}

#highway-labels[highway='service'][zoom > 16] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='residential'][zoom > 15] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='unclassified'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='tertiary'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='secondary'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='primary'][zoom > 13] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='trunk'][zoom > 12] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='motorway'][zoom > 11] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}

/* default style for all path, footway, track, cycleways and roads */
.highway[zoom > 12] {
  line-color: #000000;
  line-opacity: 0.5;
  line-join: round;
  line-cap: round;

  line-width: 1;
}

/* defaults for roads with cars */
.road[zoom > 11] {
  ::oneway_arrow[oneway='yes'][zoom > 14] {
    marker-type: arrow;

    marker-width: 2;
    marker-line-width: 2;

    marker-opacity: 1.0;
    marker-line-opacity: 1.0;

    marker-fill: white;
    marker-line-color: white;

    marker-spacing: 100;
  }

  line-color: #000000;
  line-join: round;
  line-cap: round;

  line-width: 1;

  [zoom > 17] { line-width: 15; line-opacity: 0.5; }
  [zoom = 17] { line-width: 10; line-opacity: 0.5; }
  [zoom = 16] { line-width: 5; line-opacity: 0.5; }
  [zoom = 15] { line-width: 2.25; line-opacity: 0.6; }
  [zoom = 14] { line-width: 1.5; line-opacity: 0.7; }
  [zoom = 13] { line-width: 1; line-opacity: 0.8; }
  [zoom = 12] { line-width: 0.5; line-opacity: 0.8; }

  ::bridge[bridge='yes'] {
    /*
    ideally we would draw two lines outside the existing line,
    but the current compositing method in mapnik won't allow this
    so easily with transparency

    line-color: #000000;
    line-opacity: 0.5;
    line-join: round;
    line-cap: round;

    [zoom > 17] { line-width: 20; }
    [zoom = 17] { line-width: 15; }
    [zoom = 16] { line-width: 7; }
    [zoom = 15] { line-width: 3; }
    [zoom = 14] { line-width: 2; }
    [zoom = 13] { line-width: 1.5; }
    [zoom = 12] { line-width: 0.75; }
    */
  }

  [tunnel='yes'] {
    [zoom > 17] { line-dasharray: 6,6; }
    [zoom = 17] { line-dasharray: 4.5,4.5; }
    [zoom < 17] { line-dasharray: 3,3; }
  	line-cap: butt;
  }

}

.highway#footway[zoom > 13] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 9 }
    [zoom = 18] { line-width: 6 }
    [zoom = 17] { line-width: 4 }
    [zoom < 17] { line-width: 2 }
  }

  line-color: #FF0000;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 2,8 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 1,4 }
  [zoom = 16] { line-width: 2  ; line-dasharray: 1,3 }
  [zoom < 16] { line-width: 1.5; line-dasharray: 1,2 }

  [highway='steps']{
    line-cap: butt;

    [zoom > 18] { line-dasharray: 3,4 }
    [zoom = 18] { line-dasharray: 2,3 }
    [zoom < 18] { line-dasharray: 1,2 }
  }

}

.highway#path[zoom > 12] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 9 }
    [zoom = 18] { line-width: 6 }
    [zoom = 17] { line-width: 4 }
    [zoom < 17] { line-width: 2 }
  }
  line-color: #000000;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 2,8 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 1,4 }
  [zoom = 16] { line-width: 2  ; line-dasharray: 1,3 }
  [zoom < 16] { line-width: 1.5; line-dasharray: 1,2 }

}

.highway#track[zoom > 12] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 16 }
    [zoom = 18] { line-width: 10 }
    [zoom = 17] { line-width: 6 }
    [zoom = 16] { line-width: 4.5 }
    [zoom = 15] { line-width: 3.2 }
    [zoom = 14] { line-width: 3 }
    [zoom = 13] { line-width: 2.4 }
  }

  line-color: #6d4f15;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 3,4 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 3,4 }
  [zoom = 16] { line-width: 2.1; line-dasharray: 3,4 }
  [zoom = 15] { line-width: 1.8; line-dasharray: 3,4 }
  [zoom = 14] { line-width: 1.5; line-dasharray: 3,4 }
  [zoom = 13] { line-width: 1.2  ; line-dasharray: 3,4 }

}

.highway#cycleway[zoom > 12] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 9 }
    [zoom = 18] { line-width: 6 }
    [zoom = 17] { line-width: 4 }
    [zoom < 17] { line-width: 2 }
  }

  line-color: #0000ff;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 2,8 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 1,4 }
  [zoom = 16] { line-width: 2  ; line-dasharray: 1,3 }
  [zoom < 16] { line-width: 1.5; line-dasharray: 1,2 }

}

.road#service[zoom > 11] {
  [zoom > 17] { line-width: 7.5; }
  [zoom = 17] { line-width: 5; }
  [zoom = 16] { line-width: 2.5; }
  [zoom = 15] { line-width: 1; }
  [zoom = 14] { line-width: 0.75; }
  [zoom = 13] { line-width: 0.5; }
  [zoom = 12] { line-width: 0.25; }

  [service='parking_aisle'][zoom > 14] {
    [zoom > 17] { line-width: 3; }
    [zoom = 17] { line-width: 2.5; }
    [zoom = 16] { line-width: 1.25; }
    [zoom = 15] { line-width: 0.25; }
  }

  ::private[access='private'],[access='no'],[access='permissive'],[access='customer'],[access='delivery'] {
    line-cap: butt;
    line-dasharray: 6,6;
    line-color: @private_road_colour;
    line-opacity: 0.5;

    [zoom > 17] { line-width: 7.5; }
    [zoom = 17] { line-width: 5; }
    [zoom = 16] { line-width: 2.5; }
    [zoom = 15] { line-width: 1; }
    [zoom = 14] { line-width: 0.75; }
    [zoom = 13] { line-width: 0.5; }
    [zoom = 12] { line-width: 0.25; }
  }
}

.road#residential[zoom > 11] {
  ::living_street[highway='living_street'][zoom > 14] {
    line-cap: round;
    [zoom > 17] { line-dasharray: 6,24; }
    [zoom = 17] { line-dasharray: 3,12; }
    [zoom < 17] { line-dasharray: 6,12; }
    line-color: #76d276;
    line-opacity: 0.3;

    [zoom > 17] { line-width: 10; }
    [zoom = 17] { line-width: 7.5; }
    [zoom = 16] { line-width: 3.5; }
    [zoom = 15] { line-width: 1.75; }
    [zoom = 14] { line-width: 1; }
    [zoom = 13] { line-width: 0.75; }
    [zoom = 12] { line-width: 0.3; }
  }

  ::private[access='private'],[access='no'],[access='permissive'],[access='customer'],[access='delivery'] {
    line-cap: round;
    [zoom > 17] { line-dasharray: 6,24; }
    [zoom = 17] { line-dasharray: 3,12; }
    [zoom < 17] { line-dasharray: 6,12; }
    line-color: @private_road_colour;
    line-opacity: 0.3;

    [zoom > 17] { line-width: 10; }
    [zoom = 17] { line-width: 7.5; }
    [zoom = 16] { line-width: 3.5; }
    [zoom = 15] { line-width: 1.75; }
    [zoom = 14] { line-width: 1; }
    [zoom = 13] { line-width: 0.75; }
    [zoom = 12] { line-width: 0.3; }
  }

  [zoom > 17] { line-width: 10; }
  [zoom = 17] { line-width: 7.5; }
  [zoom = 16] { line-width: 3.5; }
  [zoom = 15] { line-width: 1.75; }
  [zoom = 14] { line-width: 1; }
  [zoom = 13] { line-width: 0.75; }
  [zoom = 12] { line-width: 0.3; }

}

/* sets the colours for the road classification,
  but also draws the default line where .road doesn't apply
  ie. for zoom < 12 */
.road#unclassified{
}

.road#tertiary[zoom > 11] {
  line-color: @tertiary_road_colour;
}

.road#secondary[zoom > 7] {
  line-color: @secondary_road_colour;
  [zoom = 12] { line-width: 1.0}
}

.road#primary[zoom > 6] {
  line-color: @primary_road_colour;
  [zoom = 12] { line-width: 1.5}
}

.road#trunk[zoom > 5] {
  line-color: @trunk_road_colour;

  [zoom = 15] { line-width: 3; }
  [zoom = 14] { line-width: 2.75; }
  [zoom = 13] { line-width: 2.5; }
  [zoom = 12] { line-width: 2.0; }
  [zoom = 11] { line-width: 1.25; }
}

.road#motorway[zoom > 4] {
  line-color: @motorway_road_colour;

  /* keep in mind that most motorways are dual-carraige ways, and
     the current mapnik/osm2pgsql doesn't combine these into one
     for low zooms */

  [zoom = 16] { line-width: 6; }
  [zoom = 15] { line-width: 4; }
  [zoom = 14] { line-width: 3; }
  [zoom = 13] { line-width: 2.5; }
  [zoom = 12] { line-width: 2.0; }
  [zoom = 11] { line-width: 1.75; }
  [zoom = 10] { line-width: 1.5; }
}

/* Roads, footpaths, tracks */

@private_road_colour: #c02c34;

@tertiary_road_colour:  #faf555;
@secondary_road_colour: #d46833;
@primary_road_colour:   #cc3737;
@trunk_road_colour:     #650f0d;
@motorway_road_colour:  #7c0046;

/* paths (footway, cycleway, track) are dotted, the halo is behind the
   dots */
@path_halo_opacity: 0.3;
@path_halo_colour: white;
@path_dot_opacity: 1.0;

/* highway labels */
@highway_face_name: "Liberation Sans Regular";
@highway_text_fill: white;
@highway_halo_fill: black;
@highway_halo_radius: 2.0;

/*
  service      black
  residential  black
  unclassified black
  tertiary     yellow
  secondary    orange
  primary      red
  trunk        blue
  motorway     dark red
*/

#highway-labels[highway='footway'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='cycleway'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='path'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='track'][zoom > 13] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}

#highway-labels[highway='service'][zoom > 16] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='residential'][zoom > 15] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='unclassified'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='tertiary'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='secondary'][zoom > 14] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='primary'][zoom > 13] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='trunk'][zoom > 12] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}
#highway-labels[highway='motorway'][zoom > 11] {
  text-name: "[name]";
  text-face-name: @highway_face_name;
  text-fill: @highway_text_fill;
  text-placement: line;
  text-halo-fill: @highway_halo_fill;
  text-halo-radius: @highway_halo_radius;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
  [zoom = 14] { text-size: 10; }
  [zoom = 13] { text-size: 8; }
  [zoom = 12] {text-size: 8; }
}

/* default style for all path, footway, track, cycleways and roads */
.highway[zoom > 12] {
  line-color: #000000;
  line-opacity: 0.5;
  line-join: round;
  line-cap: round;

  line-width: 1;
}

/* defaults for roads with cars */
.road[zoom > 11] {
  ::oneway_arrow[oneway='yes'][zoom > 14] {
    marker-type: arrow;

    marker-width: 2;
    marker-line-width: 2;

    marker-opacity: 1.0;
    marker-line-opacity: 1.0;

    marker-fill: white;
    marker-line-color: white;

    marker-spacing: 100;
  }

  line-color: #000000;
  line-join: round;
  line-cap: round;

  line-width: 1;

  [zoom > 17] { line-width: 15; line-opacity: 0.5; }
  [zoom = 17] { line-width: 10; line-opacity: 0.5; }
  [zoom = 16] { line-width: 5; line-opacity: 0.5; }
  [zoom = 15] { line-width: 2.25; line-opacity: 0.6; }
  [zoom = 14] { line-width: 1.5; line-opacity: 0.7; }
  [zoom = 13] { line-width: 1; line-opacity: 0.8; }
  [zoom = 12] { line-width: 0.5; line-opacity: 0.8; }

  ::bridge[bridge='yes'] {
    /*
    ideally we would draw two lines outside the existing line,
    but the current compositing method in mapnik won't allow this
    so easily with transparency

    line-color: #000000;
    line-opacity: 0.5;
    line-join: round;
    line-cap: round;

    [zoom > 17] { line-width: 20; }
    [zoom = 17] { line-width: 15; }
    [zoom = 16] { line-width: 7; }
    [zoom = 15] { line-width: 3; }
    [zoom = 14] { line-width: 2; }
    [zoom = 13] { line-width: 1.5; }
    [zoom = 12] { line-width: 0.75; }
    */
  }

}

.highway#footway[zoom > 13] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 9 }
    [zoom = 18] { line-width: 6 }
    [zoom = 17] { line-width: 4 }
    [zoom < 17] { line-width: 2 }
  }

  line-color: #FF0000;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 2,8 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 1,4 }
  [zoom = 16] { line-width: 2  ; line-dasharray: 1,3 }
  [zoom < 16] { line-width: 1.5; line-dasharray: 1,2 }

  [highway='steps']{
    line-cap: butt;

    [zoom > 18] { line-dasharray: 3,4 }
    [zoom = 18] { line-dasharray: 2,3 }
    [zoom < 18] { line-dasharray: 1,2 }
  }

}

.highway#path[zoom > 12] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 9 }
    [zoom = 18] { line-width: 6 }
    [zoom = 17] { line-width: 4 }
    [zoom < 17] { line-width: 2 }
  }
  line-color: #000000;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 2,8 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 1,4 }
  [zoom = 16] { line-width: 2  ; line-dasharray: 1,3 }
  [zoom < 16] { line-width: 1.5; line-dasharray: 1,2 }

}

.highway#track[zoom > 12] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 16 }
    [zoom = 18] { line-width: 10 }
    [zoom = 17] { line-width: 6 }
    [zoom = 16] { line-width: 4.5 }
    [zoom = 15] { line-width: 3.2 }
    [zoom = 14] { line-width: 3 }
    [zoom = 13] { line-width: 2.4 }
  }

  line-color: #6d4f15;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 3,4 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 3,4 }
  [zoom = 16] { line-width: 2.1; line-dasharray: 3,4 }
  [zoom = 15] { line-width: 1.8; line-dasharray: 3,4 }
  [zoom = 14] { line-width: 1.5; line-dasharray: 3,4 }
  [zoom = 13] { line-width: 1.2  ; line-dasharray: 3,4 }

}

.highway#cycleway[zoom > 12] {
  ::halo{
    line-color: @path_halo_colour;
    line-opacity: @path_halo_opacity;

    [zoom > 18] { line-width: 9 }
    [zoom = 18] { line-width: 6 }
    [zoom = 17] { line-width: 4 }
    [zoom < 17] { line-width: 2 }
  }

  line-color: #0000ff;
  line-opacity: @path_dot_opacity;

  [zoom > 18] { line-width: 8  ; line-dasharray: 2,16 }
  [zoom = 18] { line-width: 5  ; line-dasharray: 2,8 }
  [zoom = 17] { line-width: 3  ; line-dasharray: 1,4 }
  [zoom = 16] { line-width: 2  ; line-dasharray: 1,3 }
  [zoom < 16] { line-width: 1.5; line-dasharray: 1,2 }

}

.road#service[zoom > 11] {
  [zoom > 17] { line-width: 7.5; }
  [zoom = 17] { line-width: 5; }
  [zoom = 16] { line-width: 2.5; }
  [zoom = 15] { line-width: 1; }
  [zoom = 14] { line-width: 0.75; }
  [zoom = 13] { line-width: 0.5; }
  [zoom = 12] { line-width: 0.25; }

  [service='parking_aisle'][zoom > 14] {
    [zoom > 17] { line-width: 3; }
    [zoom = 17] { line-width: 2.5; }
    [zoom = 16] { line-width: 1.25; }
    [zoom = 15] { line-width: 0.25; }
  }

  ::private[access='private'],[access='no'],[access='permissive'],[access='customer'],[access='delivery'] {
    line-cap: butt;
    line-dasharray: 6,6;
    line-color: @private_road_colour;
    line-opacity: 0.5;

    [zoom > 17] { line-width: 7.5; }
    [zoom = 17] { line-width: 5; }
    [zoom = 16] { line-width: 2.5; }
    [zoom = 15] { line-width: 1; }
    [zoom = 14] { line-width: 0.75; }
    [zoom = 13] { line-width: 0.5; }
    [zoom = 12] { line-width: 0.25; }
  }
}

.road#residential[zoom > 11] {
  ::living_street[highway='living_street'][zoom > 14] {
    line-cap: round;
    [zoom > 17] { line-dasharray: 6,24; }
    [zoom = 17] { line-dasharray: 3,12; }
    [zoom < 17] { line-dasharray: 6,12; }
    line-color: #76d276;
    line-opacity: 0.3;

    [zoom > 17] { line-width: 10; }
    [zoom = 17] { line-width: 7.5; }
    [zoom = 16] { line-width: 3.5; }
    [zoom = 15] { line-width: 1.75; }
    [zoom = 14] { line-width: 1; }
    [zoom = 13] { line-width: 0.75; }
    [zoom = 12] { line-width: 0.3; }
  }

  ::private[access='private'],[access='no'],[access='permissive'],[access='customer'],[access='delivery'] {
    line-cap: round;
    [zoom > 17] { line-dasharray: 6,24; }
    [zoom = 17] { line-dasharray: 3,12; }
    [zoom < 17] { line-dasharray: 6,12; }
    line-color: @private_road_colour;
    line-opacity: 0.3;

    [zoom > 17] { line-width: 10; }
    [zoom = 17] { line-width: 7.5; }
    [zoom = 16] { line-width: 3.5; }
    [zoom = 15] { line-width: 1.75; }
    [zoom = 14] { line-width: 1; }
    [zoom = 13] { line-width: 0.75; }
    [zoom = 12] { line-width: 0.3; }
  }

  [zoom > 17] { line-width: 10; }
  [zoom = 17] { line-width: 7.5; }
  [zoom = 16] { line-width: 3.5; }
  [zoom = 15] { line-width: 1.75; }
  [zoom = 14] { line-width: 1; }
  [zoom = 13] { line-width: 0.75; }
  [zoom = 12] { line-width: 0.3; }

}

/* sets the colours for the road classification,
  but also draws the default line where .road doesn't apply
  ie. for zoom < 12 */
.road#unclassified{
}

.road#tertiary[zoom > 11] {
  line-color: @tertiary_road_colour;
}

.road#secondary[zoom > 7] {
  line-color: @secondary_road_colour;
  [zoom = 12] { line-width: 1.0}
}

.road#primary[zoom > 6] {
  line-color: @primary_road_colour;
  [zoom = 12] { line-width: 1.5}
}

.road#trunk[zoom > 5] {
  line-color: @trunk_road_colour;

  [zoom = 15] { line-width: 3; }
  [zoom = 14] { line-width: 2.75; }
  [zoom = 13] { line-width: 2.5; }
  [zoom = 12] { line-width: 2.0; }
  [zoom = 11] { line-width: 1.25; }
}

.road#motorway[zoom > 4] {
  line-color: @motorway_road_colour;

  /* keep in mind that most motorways are dual-carraige ways, and
     the current mapnik/osm2pgsql doesn't combine these into one
     for low zooms */

  [zoom = 16] { line-width: 6; }
  [zoom = 15] { line-width: 4; }
  [zoom = 14] { line-width: 3; }
  [zoom = 13] { line-width: 2.5; }
  [zoom = 12] { line-width: 2.0; }
  [zoom = 11] { line-width: 1.75; }
  [zoom = 10] { line-width: 1.5; }
}


#5 adjust halos for parks / open space

#5 adjust halos for parks / open space

@text_font_transport: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_administrative: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_city: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_parks: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_water: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_water_bold: 'PT Sans Narrow Bold', 'Unifont Bold';

@label_color_transport: #524c4c;
@label_color_administrative: #2e2115;
@label_color_city: #2e2115;

@text_font_size_xxsm: 12;
@text_font_size_xsm: 14;
@text_font_size_sm: 15;
@text_font_size_medium: 17;
@text_font_size_medium_plus: 18;
@text_font_size_large: 20;

@text_font_halo_radius_sm: 1;
@text_font_halo_radius_large: 2;

@label_color_halo_low: fadeout(rgba(255,255,255,0.7), 30%);
@label_color_halo_high: fadeout(rgba(255,255,255,1), 30%);
@label_color_administrative_halo: fadeout(#fff, 30%);
@label_color_physical: #000;
@label_color_physical_halo: #fff;
@label_color_transport_halo: #F7F7E6;
@label_color_airport_halo: #f7f7e6;
@label_color_places_halo_low: fadeout(rgba(255,255,255, 0.7), 30%);
@label_color_places_halo_high: fadeout(rgba(255,255,255, 1), 30%);

@label_color_green_area: #374c30;
@label_color_green_area_halo: #c0d3b5;
@label_color_water: darken(@color_water,20);
@label_color_water_halo: @color_water;

Map {
  font-directory: url("fonts/");
  buffer-size: 128;
}

#minor_road_labels,
#major_road_labels,
{
  text-name: [name];
  text-face-name: @text_font_transport;
  text-size: 16;
  text-placement: line;
  text-max-char-angle-delta: 20;
  text-fill: #444;
  text-spacing: 256;
  text-avoid-edges: true;
  text-halo-fill: @label_color_transport_halo;
  text-halo-radius: 2;
}

#shields {
  [zoom>=11] {

    /* tmp place holder for hwy shields */

  }
}

#ne_110m_geography_marine_polys[zoom=2][scalerank=0][changed!=''],
#ne_110m_geography_marine_polys[zoom=3][changed!=''],
#ne_50m_geography_marine_polys[zoom=4][scalerank<4][changed!=''] {
    text-name: [name];
    [namealt!=''] {
      text-name: [name] + '\n(' + [namealt] + ')';
    }
  text-face-name: @text_font_water_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_water;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_water_halo;
}

#ne_50m_geography_marine_polys[zoom=5][changed!=''],
#ne_10m_geography_marine_polys[zoom>=6][zoom<=8][changed!='']
{
    text-name: [name];
    [namealt!=''] {
      text-name: [name] + '\n(' + [namealt] + ')';
    }
    [name = 'Hecate Straight'] {
      text-name: 'Hecate Strait' + [namealt]; // Becase we know namealt is empty
    }
    [name = 'Queen Charlotte Straight'] {
      text-name: 'Queen Charlotte Strait' + [namealt]; // Becase we know namealt is empty
    }
    text-face-name: @text_font_water;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_water;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_water_halo;
}

#water-bodies-labels-low,
#water-bodies-labels-med,
#water-bodies-labels-high {
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>25000000],
  [zoom=12][area>5000000],
  [zoom=13][area>2000000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
    text-name: "[name]";
    text-face-name: @text_font_water;
    text-placement: interior;
    text-max-char-angle-delta: 30;
    text-wrap-width: 40;
    text-halo-radius: @text_font_halo_radius_large;
    text-fill: @label_color_water;
    text-halo-fill: @label_color_water_halo;
    text-size: @text_font_size_xsm;

    [zoom>9][zoom<12] {
      text-spacing: 200;
      text-wrap-width: 50;
    }
    [zoom=12] {
      text-size: @text_font_size_xsm;
      text-spacing: 200;
      text-wrap-width: 70;
    }
    [zoom=13] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom=14] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=15] {
      text-size: @text_font_size_sm;
      text-spacing: 100;
      text-wrap-width: 40;
    }
  }
}

#green-areas-labels-low,
#green-areas-labels-med,
#green-areas-labels-high {
  [zoom=8][area>100000000],
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>5000000],
  [zoom=12][area>1000000],
  [zoom=13][area>400000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
    text-name: [name];
    text-face-name: @text_font_parks;
    text-placement: interior;
    text-wrap-width: 96;
    text-wrap-before: true;
    text-line-spacing: -3;
    text-fill: @label_color_green_area;
    text-size: 15;

    [zoom>=8] {
      text-halo-fill: @label_color_green_area_halo;
      text-halo-radius: @text_font_halo_radius_sm;
    }

    [zoom>=11] {
      text-fill: #586e50;
      text-halo-radius: @text_font_halo_radius_large;
    }

    [zoom>=15] {
      text-size: 20;
      text-line-spacing: -7;
    }
  }
}

#continents
{
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 32;
  text-size: 24;
  text-line-spacing: -12;
  text-fill: #2e2115;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;
}

#admin1-labels-50m-z4 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-name: "[label_z4]";
    text-size:  @text_font_size_xsm;
}

#admin1-labels-50m-z5 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-halo-comp-op: overlay;
    text-halo-rasterizer: fast;
    text-name: "[label_z5]";
    text-size:  @text_font_size_medium_plus;
}

#admin1-labels-50m-z6 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-name: "[label_z6]";
    text-size:  @text_font_size_large;
}

#admin1-labels-50m-z7 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-name: "[label_z7]";
    text-size:  @text_font_size_large;
}

#admin0-labels-z3[longfrom>3] {
    text-name: "[shortname]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 18;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-fill: @label_color_administrative;
    text-min-distance: 5;
}

#admin0-labels-z3[longfrom<=3] {
    text-name: "[name]";
    text-face-name: @text_font_administrative;
    text-size: 22;
    text-line-spacing: -8;
    text-wrap-width: 100;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-fill: @label_color_administrative;
}

#admin0-labels-z4 {
    text-name: [name];
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 22;
    text-min-distance: 15;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-fill: @label_color_administrative;
}

#admin0-labels-z5 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;
  text-fill: @label_color_administrative;
}

#admin0-labels-z6 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;
  text-fill: @label_color_administrative;
}

#city_labels_z4,
#city_labels_z5,
#city_labels_z6 {
  // for debugging
  //::outline {
  //  polygon-fill: #fff;
  //  polygon-opacity: 0.1;
  //}
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-placement: interior;
  text-vertical-alignment: bottom;
  text-min-distance: 5;
  text-dy: -5;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;

  [justified='left'] {
    //text-horizontal-alignment: left;
    text-horizontal-alignment: middle;
    //text-dx: 20;
  }

  [justified='right'] {
    //text-horizontal-alignment: right;
    text-horizontal-alignment: middle;
    //text-dx: -20;
  }

  [zoom>=4]  {
    text-size: @text_font_size_xxsm;
  }

  [zoom>=5] {
    text-size: @text_font_size_xsm;
  }

  [font_size>=14] {
    text-size: @text_font_size_medium;
  }

  [font_size>=16] {
    text-size: @text_font_size_medium_plus;
  }

  [font_size>=18] {
    text-size: @text_font_size_large;
  }
}

#city_labels_z7,
#city_labels_z8, {
  // for debugging
  //::outline {
  //  polygon-fill: #fff;
  //  polygon-opacity: 0.3;
  //}
  [justified='left'] {
    text-horizontal-alignment: left;
    text-dx: 15;
  }

  [justified='right'] {
    text-horizontal-alignment: right;
    text-dx: -15;
  }

  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_sm;
  text-min-distance: 5;
  text-allow-overlap: true;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;

  [font_size>=14] {
    text-size: @text_font_size_medium;
  }

  [font_size>=20] {
    text-size: @text_font_size_large;
  }
}

#city_labels_z9,
#city_labels_z10 {
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_medium_plus;
  text-halo-radius: @text_font_halo_radius_large;
  text-halo-fill: @label_color_halo_high;
  text-halo-comp-op: overlay;

  [font_size>=20] {
    text-size: @text_font_size_large;
  }

  [zoom>=11] {
    text-halo-fill: @label_color_places_halo_low;
  }
}

#city_points_z4,
#city_points_z5,
#city_points_z6,
#city_points_z7,
#city_points_z8 {
  marker-ignore-placement: true;
  marker-width: 5;
  marker-fill: #2e2115;
  marker-line-width: 0;
}

#airports {
  [zoom>=10] {
    text-name: [abbrev];
    text-face-name: @text_font_transport;
    text-fill: #444;
    text-size: @text_font_size_medium_plus;

    text-halo-fill: @label_color_airport_halo;
    text-halo-radius: @text_font_halo_radius_large;

    text-wrap-width: 128;
    text-dy: 14;
  }

  [zoom>=13] {
    text-name: [name];
  }

  [zoom=14][natlscale>.04],
  [zoom=15][natlscale>.02],
  [zoom>=16][natlscale>.01]
  {
      text-dy: 20;
  }

  [zoom=8][natlscale>2.3][type='major'],
  [zoom=9][natlscale>1.2][type='major'],
  [zoom=10][natlscale>0.57][type='major'],
  [zoom=11][natlscale>0.29][type='major'],
  [zoom=12][natlscale>0.29][type='major'],
  [zoom=13][natlscale>0.29][type='major']
  {
    point-file: url('icons/airport_major_l.png');
  }

  [zoom=14][natlscale>.29][type='major'],
  [zoom=15][natlscale>.29][type='major'],
  [zoom>=16][natlscale>.29][type='major']
  {
      point-file: url('icons/airport_major_xl.png');
  }

  [zoom=8][natlscale>2.3][type='small'],
  [zoom=9][natlscale>1.2][type='small'],
  [zoom=10][natlscale>.57][type='small'],
  [zoom=11][natlscale>.29][type='small'],
  [zoom=12][natlscale>.29][type='small'],
  [zoom=13][natlscale>.29][type='small']
  {
      point-file: url('icons/airport_small_l.png');
  }

  [zoom=14][natlscale>.29][type='small'],
  [zoom=15][natlscale>.29][type='small'],
  [zoom>=16][natlscale>.29][type='small']
  {
      point-file: url('icons/airport_small_xl.png');
  }

  [zoom=8][natlscale>2.3][type='military'],
  [zoom=9][natlscale>1.2][type='military'],
  [zoom=10][natlscale>.57][type='military'],
  [zoom=11][natlscale>.29][type='military'],
  [zoom=12][natlscale>.29][type='military'],
  [zoom=13][natlscale>.29][type='military']
  {
      point-file: url('icons/airport_military_l.png');
  }

  [zoom=14][natlscale>.29][type='military'],
  [zoom=15][natlscale>.29][type='military'],
  [zoom>=16][natlscale>.29][type='military']
  {
      point-file: url('icons/airport_military_xl.png');
  }

  [zoom=8][natlscale>2.3][type='spaceport'],
  [zoom=9][natlscale>1.2][type='spaceport'],
  [zoom=10][natlscale>.57][type='spaceport'],
  [zoom=11][natlscale>.29][type='spaceport'],
  [zoom=12][natlscale>.29][type='spaceport'],
  [zoom=13][natlscale>.29][type='spaceport']
  {
      point-file: url('icons/intergalactic_l.png');
  }

  [zoom=14][natlscale>.29][type='spaceport'],
  [zoom=15][natlscale>.29][type='spaceport'],
  [zoom>=16][natlscale>.29][type='spaceport']
  {
      point-file: url('icons/intergalactic_xl.png');
  }
}

@text_font_transport: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_administrative: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_city: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_parks: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_water: 'PT Sans Narrow Regular', 'Unifont Medium';
@text_font_water_bold: 'PT Sans Narrow Bold', 'Unifont Bold';

@label_color_transport: #524c4c;
@label_color_administrative: #2e2115;
@label_color_city: #2e2115;

@text_font_size_xxsm: 12;
@text_font_size_xsm: 14;
@text_font_size_sm: 15;
@text_font_size_medium: 17;
@text_font_size_medium_plus: 18;
@text_font_size_large: 20;

@text_font_halo_radius_sm: 1;
@text_font_halo_radius_large: 2;

@label_color_halo_low: fadeout(rgba(255,255,255,0.7), 30%);
@label_color_halo_high: fadeout(rgba(255,255,255,1), 30%);
@label_color_administrative_halo: fadeout(#fff, 30%);
@label_color_physical: #000;
@label_color_physical_halo: #fff;
@label_color_transport_halo: #F7F7E6;
@label_color_airport_halo: #f7f7e6;
@label_color_places_halo_low: fadeout(rgba(255,255,255, 0.7), 30%);
@label_color_places_halo_high: fadeout(rgba(255,255,255, 1), 30%);

@label_color_green_area: #374c30;
@label_color_green_area_halo: #c0d3b5;
@label_color_water: darken(@color_water,20);
@label_color_water_halo: @color_water;

Map {
  font-directory: url("fonts/");
  buffer-size: 128;
}

#minor_road_labels,
#major_road_labels,
{
  text-name: [name];
  text-face-name: @text_font_transport;
  text-size: 16;
  text-placement: line;
  text-max-char-angle-delta: 20;
  text-fill: #444;
  text-spacing: 256;
  text-avoid-edges: true;
  text-halo-fill: @label_color_transport_halo;
  text-halo-radius: 2;
}

#shields {
  [zoom>=11] {

    /* tmp place holder for hwy shields */

  }
}

#ne_110m_geography_marine_polys[zoom=2][scalerank=0][changed!=''],
#ne_110m_geography_marine_polys[zoom=3][changed!=''],
#ne_50m_geography_marine_polys[zoom=4][scalerank<4][changed!=''] {
    text-name: [name];
    [namealt!=''] {
      text-name: [name] + '\n(' + [namealt] + ')';
    }
  text-face-name: @text_font_water_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_water;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_water_halo;
}

#ne_50m_geography_marine_polys[zoom=5][changed!=''],
#ne_10m_geography_marine_polys[zoom>=6][zoom<=8][changed!='']
{
    text-name: [name];
    [namealt!=''] {
      text-name: [name] + '\n(' + [namealt] + ')';
    }
    [name = 'Hecate Straight'] {
      text-name: 'Hecate Strait' + [namealt]; // Becase we know namealt is empty
    }
    [name = 'Queen Charlotte Straight'] {
      text-name: 'Queen Charlotte Strait' + [namealt]; // Becase we know namealt is empty
    }
    text-face-name: @text_font_water;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_water;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_water_halo;
}

#water-bodies-labels-low,
#water-bodies-labels-med,
#water-bodies-labels-high {
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>25000000],
  [zoom=12][area>5000000],
  [zoom=13][area>2000000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
    text-name: "[name]";
    text-face-name: @text_font_water;
    text-placement: interior;
    text-max-char-angle-delta: 30;
    text-wrap-width: 40;
    text-halo-radius: @text_font_halo_radius_large;
    text-fill: @label_color_water;
    text-halo-fill: @label_color_water_halo;
    text-size: @text_font_size_xsm;

    [zoom>9][zoom<12] {
      text-spacing: 200;
      text-wrap-width: 50;
    }
    [zoom=12] {
      text-size: @text_font_size_xsm;
      text-spacing: 200;
      text-wrap-width: 70;
    }
    [zoom=13] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom=14] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=15] {
      text-size: @text_font_size_sm;
      text-spacing: 100;
      text-wrap-width: 40;
    }
  }
}

#green-areas-labels-low,
#green-areas-labels-med,
#green-areas-labels-high {
  [zoom=8][area>100000000],
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>5000000],
  [zoom=12][area>1000000],
  [zoom=13][area>400000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
    text-name: [name];
    text-face-name: @text_font_parks;
    text-placement: interior;
    text-wrap-width: 96;
    text-wrap-before: true;
    text-line-spacing: -3;
    text-fill: @label_color_green_area;
    text-size: 15;

    [zoom>=11] {
      text-fill: #586e50;
    }

    [zoom>=15] {
      text-size: 20;
      text-line-spacing: -7;
    }

    [zoom>=11] {
      text-halo-radius: @text_font_halo_radius_sm;
      text-halo-fill: @label_color_green_area_halo;
    }
    [zoom>=15] {
      text-halo-radius: @text_font_halo_radius_large;
    }
  }
}

#continents
{
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 32;
  text-size: 24;
  text-line-spacing: -12;
  text-fill: #2e2115;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;
}

#admin1-labels-50m-z4 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-name: "[label_z4]";
    text-size:  @text_font_size_xsm;
}

#admin1-labels-50m-z5 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-halo-comp-op: overlay;
    text-halo-rasterizer: fast;
    text-name: "[label_z5]";
    text-size:  @text_font_size_medium_plus;
}

#admin1-labels-50m-z6 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-name: "[label_z6]";
    text-size:  @text_font_size_large;
}

#admin1-labels-50m-z7 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-name: "[label_z7]";
    text-size:  @text_font_size_large;
}

#admin0-labels-z3[longfrom>3] {
    text-name: "[shortname]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 18;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-fill: @label_color_administrative;
    text-min-distance: 5;
}

#admin0-labels-z3[longfrom<=3] {
    text-name: "[name]";
    text-face-name: @text_font_administrative;
    text-size: 22;
    text-line-spacing: -8;
    text-wrap-width: 100;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-fill: @label_color_administrative;
}

#admin0-labels-z4 {
    text-name: [name];
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 22;
    text-min-distance: 15;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_halo_low;
    text-fill: @label_color_administrative;
}

#admin0-labels-z5 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;
  text-fill: @label_color_administrative;
}

#admin0-labels-z6 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;
  text-fill: @label_color_administrative;
}

#city_labels_z4,
#city_labels_z5,
#city_labels_z6 {
  // for debugging
  //::outline {
  //  polygon-fill: #fff;
  //  polygon-opacity: 0.1;
  //}
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-placement: interior;
  text-vertical-alignment: bottom;
  text-min-distance: 5;
  text-dy: -5;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;

  [justified='left'] {
    //text-horizontal-alignment: left;
    text-horizontal-alignment: middle;
    //text-dx: 20;
  }

  [justified='right'] {
    //text-horizontal-alignment: right;
    text-horizontal-alignment: middle;
    //text-dx: -20;
  }

  [zoom>=4]  {
    text-size: @text_font_size_xxsm;
  }

  [zoom>=5] {
    text-size: @text_font_size_xsm;
  }

  [font_size>=14] {
    text-size: @text_font_size_medium;
  }

  [font_size>=16] {
    text-size: @text_font_size_medium_plus;
  }

  [font_size>=18] {
    text-size: @text_font_size_large;
  }
}

#city_labels_z7,
#city_labels_z8, {
  // for debugging
  //::outline {
  //  polygon-fill: #fff;
  //  polygon-opacity: 0.3;
  //}
  [justified='left'] {
    text-horizontal-alignment: left;
    text-dx: 15;
  }

  [justified='right'] {
    text-horizontal-alignment: right;
    text-dx: -15;
  }

  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_sm;
  text-min-distance: 5;
  text-allow-overlap: true;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_halo_low;

  [font_size>=14] {
    text-size: @text_font_size_medium;
  }

  [font_size>=20] {
    text-size: @text_font_size_large;
  }
}

#city_labels_z9,
#city_labels_z10 {
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_medium_plus;
  text-halo-radius: @text_font_halo_radius_large;
  text-halo-fill: @label_color_halo_high;
  text-halo-comp-op: overlay;

  [font_size>=20] {
    text-size: @text_font_size_large;
  }

  [zoom>=11] {
    text-halo-fill: @label_color_places_halo_low;
  }
}

#city_points_z4,
#city_points_z5,
#city_points_z6,
#city_points_z7,
#city_points_z8 {
  marker-ignore-placement: true;
  marker-width: 5;
  marker-fill: #2e2115;
  marker-line-width: 0;
}

#airports {
  [zoom>=10] {
    text-name: [abbrev];
    text-face-name: @text_font_transport;
    text-fill: #444;
    text-size: @text_font_size_medium_plus;

    text-halo-fill: @label_color_airport_halo;
    text-halo-radius: @text_font_halo_radius_large;

    text-wrap-width: 128;
    text-dy: 14;
  }

  [zoom>=13] {
    text-name: [name];
  }

  [zoom=14][natlscale>.04],
  [zoom=15][natlscale>.02],
  [zoom>=16][natlscale>.01]
  {
      text-dy: 20;
  }

  [zoom=8][natlscale>2.3][type='major'],
  [zoom=9][natlscale>1.2][type='major'],
  [zoom=10][natlscale>0.57][type='major'],
  [zoom=11][natlscale>0.29][type='major'],
  [zoom=12][natlscale>0.29][type='major'],
  [zoom=13][natlscale>0.29][type='major']
  {
    point-file: url('icons/airport_major_l.png');
  }

  [zoom=14][natlscale>.29][type='major'],
  [zoom=15][natlscale>.29][type='major'],
  [zoom>=16][natlscale>.29][type='major']
  {
      point-file: url('icons/airport_major_xl.png');
  }

  [zoom=8][natlscale>2.3][type='small'],
  [zoom=9][natlscale>1.2][type='small'],
  [zoom=10][natlscale>.57][type='small'],
  [zoom=11][natlscale>.29][type='small'],
  [zoom=12][natlscale>.29][type='small'],
  [zoom=13][natlscale>.29][type='small']
  {
      point-file: url('icons/airport_small_l.png');
  }

  [zoom=14][natlscale>.29][type='small'],
  [zoom=15][natlscale>.29][type='small'],
  [zoom>=16][natlscale>.29][type='small']
  {
      point-file: url('icons/airport_small_xl.png');
  }

  [zoom=8][natlscale>2.3][type='military'],
  [zoom=9][natlscale>1.2][type='military'],
  [zoom=10][natlscale>.57][type='military'],
  [zoom=11][natlscale>.29][type='military'],
  [zoom=12][natlscale>.29][type='military'],
  [zoom=13][natlscale>.29][type='military']
  {
      point-file: url('icons/airport_military_l.png');
  }

  [zoom=14][natlscale>.29][type='military'],
  [zoom=15][natlscale>.29][type='military'],
  [zoom>=16][natlscale>.29][type='military']
  {
      point-file: url('icons/airport_military_xl.png');
  }

  [zoom=8][natlscale>2.3][type='spaceport'],
  [zoom=9][natlscale>1.2][type='spaceport'],
  [zoom=10][natlscale>.57][type='spaceport'],
  [zoom=11][natlscale>.29][type='spaceport'],
  [zoom=12][natlscale>.29][type='spaceport'],
  [zoom=13][natlscale>.29][type='spaceport']
  {
      point-file: url('icons/intergalactic_l.png');
  }

  [zoom=14][natlscale>.29][type='spaceport'],
  [zoom=15][natlscale>.29][type='spaceport'],
  [zoom>=16][natlscale>.29][type='spaceport']
  {
      point-file: url('icons/intergalactic_xl.png');
  }
}


lighten minor roads

lighten minor roads

@color_physical: lighten(#000, 85%);
@color_physical_bright: #fff;
@color_water: lighten(#000, 85%);
@color_administrative_dark: lighten(#000, 55%);
@color_administrative_bright: #fff;
@color_administrative_medium_low: lighten(#000, 55%);
@color_administrative_medium_high: lighten(#000, 55%);
@color_administrative_medium_high2: lighten(#000, 55%);
@color_transport: lighten(#000, 55%);
@color_transport_casing: #fff;
@color_transport_inline: #fff;
@color_transport_tunnel: lighten(#ccc, 60%);
@color_transport_minor: lighten(#ccc, 60%);
@color_transport_rail: lighten(#444, 60%);
@color_transport_path: lighten(#ededed, 60%);
@color_building_outline: lighten(#000, 72%);
@color_building_outline_special: lighten(#00aeef, 72%);
@color_airport_runways: lighten(#eee, 55%);
@color_airport_runways_detail: lighten(#f2f2f2, 55%);
@halftone_opacity: 0.15;

@color_physical: lighten(#000, 85%);
@color_physical_bright: #fff;
@color_water: lighten(#000, 85%);
@color_administrative_dark: lighten(#000, 55%);
@color_administrative_bright: #fff;
@color_administrative_medium_low: lighten(#000, 55%);
@color_administrative_medium_high: lighten(#000, 55%);
@color_administrative_medium_high2: lighten(#000, 55%);
@color_transport: lighten(#000, 55%);
@color_transport_casing: lighten(#fff, 55%);
@color_transport_inline: lighten(#fff, 55%);
@color_transport_tunnel: lighten(#ccc, 55%);
@color_transport_minor: lighten(#ccc, 55%);
@color_transport_rail: lighten(#444, 55%);
@color_transport_path: lighten(#ededed, 55%);
@color_building_outline: lighten(#000, 72%);
@color_building_outline_special: lighten(#00aeef, 72%);
@color_airport_runways: lighten(#eee, 55%);
@color_airport_runways_detail: lighten(#f2f2f2, 55%);
@halftone_opacity: 0.15;


changed comments from /* to // in order to allow for easier commenting out large sections while debugging

/* LABELS.MSS CONTENTS:
 * - place names
 * - area labels
 * - waterway labels
 */

/* Font sets are defined in palette.mss */

/* Mapnik does not yet support character-spacing adjustments for
   labels placed along a line. We can fake this using the replace()
   function in the text-name parameter by replacing each character
   with itself followed by one or more spaces. */

/* ================================================================== */
/* PLACE NAMES
/* ================================================================== */

#place::country[type='country'][zoom>3][zoom<9] {
  text-name:'[name]';
  text-face-name:@sans_bold;
  text-placement:point;
  text-fill:@country_text;
  text-halo-fill: @country_halo;
  text-halo-radius: 1;
  [zoom=3] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=4] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>4] {
    text-halo-radius: 2;
  }
  [zoom=5] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=6] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=7] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

#place::state[type='state'][zoom>=5][zoom<=10] {
  text-name:'[name]';
  text-face-name:@sans_bold_italic;
  text-placement:point;
  text-fill:@state_text;
  text-halo-fill: @state_halo;
  text-halo-radius: 1;
  [zoom=6] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=7] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>8] {
    text-halo-radius: 2;
  }
  [zoom=8] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=9] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=10] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

// ---- Cities ------------------------------------------------------

#place::city[type='city'][zoom>=2][zoom<=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@city_text;
  text-halo-fill:@city_halo;
  text-halo-radius:2;
  [zoom<=8] {
    text-size: 10;
    text-halo-radius:1;
  }
  [zoom=9] {
    text-size:10;
    text-wrap-width: 60;
  }
  [zoom=10] {
    text-size:11;
    text-wrap-width: 70;
  }
  [zoom=11] {
    text-size:12;
    text-character-spacing: 1;
    text-wrap-width: 80;
  }
  [zoom=12] {
    text-size:13;
    text-character-spacing: 1;
    text-wrap-width: 100;
  }
  [zoom=13] {
    text-size:14;
    text-character-spacing: 2;
    text-wrap-width: 200;
    text-transform: uppercase;
  }
  [zoom=14] {
    text-size:15;
    text-character-spacing: 4;
    text-wrap-width: 300;
    text-transform: uppercase;
  }
  [zoom=15] {
    text-size:16;
    text-character-spacing: 6;
    text-wrap-width: 400;
    text-transform: uppercase;
  }
}

// ---- Towns -------------------------------------------------------

#place::town[type='town'][zoom>=9][zoom<=17] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@town_text;
  text-size:9;
  text-halo-fill:@town_halo;
  text-halo-radius:1;
  text-wrap-width: 50;
  [zoom>=10] {
    text-halo-radius:2;
    text-size: 10;
  }
  [zoom>=11]{ text-size:11; }
  [zoom>=12]{
    text-size:12;
    text-line-spacing: 1;
  }
  [zoom>=13]{
    text-transform: uppercase;
    text-character-spacing: 1;
    text-line-spacing: 2;
  }
  [zoom>=14]{
    text-size:13;
    text-character-spacing: 2;
    text-line-spacing: 3;
  }
  [zoom>=15]{
    text-size:14;
    text-character-spacing: 3;
    text-line-spacing: 4;
  }
  [zoom>=15]{
    text-size:15;
    text-character-spacing: 4;
    text-line-spacing: 5;
  }
  [zoom>=17]{
    text-size:16;
    text-character-spacing: 5;
    text-line-spacing: 6;
  }
}

// ---- Other small places ------------------------------------------

#place::small[type='village'][zoom>=13],
#place::small[type='suburb'][zoom>=13],
#place::small[type='hamlet'][zoom>=13]{
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@other_text;
  text-size:10;
  text-halo-fill:@other_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=14] {
    text-size:11;
    text-character-spacing: 1;
    text-wrap-width: 40;
    text-line-spacing: 1;
  }
  [zoom>=15] {
    text-halo-radius: 2;
    text-transform: uppercase;
    text-character-spacing: 1;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=16] {
    text-size:12;
    text-character-spacing: 2;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=17] {
    text-size:13;
    text-character-spacing: 3;
    text-wrap-width: 160;
    text-line-spacing: 4;
  }
  [zoom>=18] {
    text-size:14;
    text-character-spacing: 4;
    text-line-spacing: 6;
  }
}

#place::small[type='locality'][zoom>=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@locality_text;
  text-size:9;
  text-halo-fill:@locality_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=16] {
    text-size:10;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=17] {
    text-size:11;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=18] {
    text-size:12;
    text-character-spacing: 1;
    text-line-spacing: 4;
  }
}

// ==================================================================
// AREA LABELS
// ==================================================================

#area_label[type='golf_course'][zoom>=10],
#area_label[type='park'][zoom>=10] {
  text-name: "''";
  text-fill: @park * 0.6;
  text-halo-fill: fadeout(@park,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom>=15][area>1600000],
  [zoom>=16][area>80000],
  [zoom>=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='cemetery'][zoom>=10] {
  text-name: "''";
  text-fill: @cemetery * 0.6;
  text-halo-fill: fadeout(@cemetery,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='hospital'][zoom>=10] {
  text-name: "''";
  text-fill: @hospital * 0.6;
  text-halo-fill: fadeout(lighten(@hospital,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='college'][zoom>=10],
#area_label[type='school'][zoom>=10],
#area_label[type='university'][zoom>=10] {
  text-name: "''";
  text-fill: @school * 0.6;
  text-halo-fill: fadeout(lighten(@school,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='water'][zoom>=10] {
  text-name: "''";
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-face-name:@sans_italic;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
    text-character-spacing: 1;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 2;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 3;
    text-wrap-width: 180;
  }
}

#poi[type='university'][zoom>=15],
#poi[type='hospital'][zoom>=16],
#poi[type='school'][zoom>=17],
#poi[type='library'][zoom>=17] {
  text-name:"[name]";
  text-face-name:@sans;
  text-size:10;
  text-wrap-width:30;
  text-fill: @poi_text;
}

// Islands and islets

#island_label_polygon {
  [zoom=10][area>2000000],
  [zoom=11][area>500000],
  [zoom=12][area>200000],
  [zoom=13][area>50000],
  [zoom=14][area>10000],
  [zoom=15][area>2500],
  [zoom>15][area>0] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// nodes with name and place=island/islet
#island_label_point {
  [zoom>=13] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// Residential is often used as neighborhood name, block name and more

#area_label[type = 'residential']{
  [zoom=12][area>1280000],
  [zoom=13][area>640000],
  [zoom=14][area>320000],
  [zoom=15][area>240000],
  [zoom=16][area>90000],
  [zoom=17][area>10000],
  [zoom=18][area>=0] {
    text-name: "[name]";
    text-fill:@other_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@other_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// ==================================================================
// WATERWAY LABELS
// ==================================================================

#waterway_label[type='river'][zoom>=13],
#waterway_label[type='canal'][zoom>=15],
#waterway_label[type='stream'][zoom>=17] {
  text-name: '[name]';
  text-face-name: @sans_italic;
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-placement: line;
  text-min-distance: 400;
  text-size: 10;
  [type='river'][zoom=14],
  [type='canal'][zoom=16],
  [type='stream'][zoom=18] {
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom=15],
  [type='canal'][zoom=17] {
    text-size: 11;
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom>=16],
  [type='canal'][zoom=18] {
    text-size: 14;
    text-name: "[name].replace('([\S\ ])','$1 ')";
    text-spacing: 300;
  }
}

// ==================================================================
// ROAD LABELS
// ==================================================================

#motorway_label[zoom>=11][zoom<=14][reflen<=8] {
  shield-name: "[ref]";
  shield-size: 9;
  shield-face-name: @sans_bold;
  shield-fill: #fff;
  shield-file: url(img/shield-motorway-1.png);
  [type='motorway'] {
    [reflen=1] { shield-file: url(img/shield-motorway-1.png); }
    [reflen=2] { shield-file: url(img/shield-motorway-2.png); }
    [reflen=3] { shield-file: url(img/shield-motorway-3.png); }
    [reflen=4] { shield-file: url(img/shield-motorway-4.png); }
    [reflen=5] { shield-file: url(img/shield-motorway-5.png); }
    [reflen=6] { shield-file: url(img/shield-motorway-6.png); }
    [reflen=7] { shield-file: url(img/shield-motorway-7.png); }
    [reflen=8] { shield-file: url(img/shield-motorway-8.png); }
  }
  [type='trunk'] {
    [reflen=1] { shield-file: url(img/shield-trunk-1.png); }
    [reflen=2] { shield-file: url(img/shield-trunk-2.png); }
    [reflen=3] { shield-file: url(img/shield-trunk-3.png); }
    [reflen=4] { shield-file: url(img/shield-trunk-4.png); }
    [reflen=5] { shield-file: url(img/shield-trunk-5.png); }
    [reflen=6] { shield-file: url(img/shield-trunk-6.png); }
    [reflen=7] { shield-file: url(img/shield-trunk-7.png); }
    [reflen=8] { shield-file: url(img/shield-trunk-8.png); }
  }
  [zoom=11] { shield-min-distance: 60; } //50
  [zoom=12] { shield-min-distance: 80; } //60
  [zoom=13] { shield-min-distance: 120; } //120
  [zoom=14] { shield-min-distance: 180; }
}

#motorway_label[type='motorway'][zoom>9],
#motorway_label[type='trunk'][zoom>9] {
  text-name:"[name]";
  text-face-name:@sans_bold;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:10;
  [zoom=11] { text-min-distance:70; }
  [zoom=12] { text-min-distance:80; }
  [zoom=13] { text-min-distance:100; }
}

#mainroad_label[type='primary'][zoom>12],
#mainroad_label[type='secondary'][zoom>13],
#mainroad_label[type='tertiary'][zoom>13] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

#minorroad_label[zoom>14] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-size:9;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

// ==================================================================
// ONE-WAY ARROWS
// ==================================================================

#motorway_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16],
#mainroad_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16],
#minorroad_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16] {
  marker-placement:line;
  marker-max-error: 0.5;
  marker-spacing: 200;
  marker-file: url(img/icon/oneway.svg);
  [oneway=-1] { marker-file: url(img/icon/oneway-reverse.svg); }
  [oneway='reverse'] { marker-file: url(img/icon/oneway-reverse.svg); }
  [zoom=16] { marker-transform: "scale(0.5)"; }
  [zoom=17] { marker-transform: "scale(0.75)"; }
}

/* house names and numbers */

#housenumbers {
  [zoom >= 18] {
    text-name: "[addr:housenumber]";
    text-placement: interior;
    text-min-distance: 1;
    text-wrap-width: 0;
    text-face-name: @sans_lt;
    text-fill: #444;
    text-size: 9;
  }
}

#housenames {
  [zoom >= 17] {
    text-name: "[addr:housename]";
    text-placement: interior;
    text-wrap-width: 20;
    text-face-name: @sans_lt;
    text-size: 8;
    text-fill: #444;
    [zoom >= 18] {
      text-size: 9;
    }
  }
}

/* LABELS.MSS CONTENTS:
 * - place names
 * - area labels
 * - waterway labels
 */

/* Font sets are defined in palette.mss */

/* Mapnik does not yet support character-spacing adjustments for
   labels placed along a line. We can fake this using the replace()
   function in the text-name parameter by replacing each character
   with itself followed by one or more spaces. */

/* ================================================================== */
/* PLACE NAMES
/* ================================================================== */

#place::country[type='country'][zoom>3][zoom<9] {
  text-name:'[name]';
  text-face-name:@sans_bold;
  text-placement:point;
  text-fill:@country_text;
  text-halo-fill: @country_halo;
  text-halo-radius: 1;
  [zoom=3] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=4] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>4] {
    text-halo-radius: 2;
  }
  [zoom=5] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=6] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=7] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

#place::state[type='state'][zoom>=5][zoom<=10] {
  text-name:'[name]';
  text-face-name:@sans_bold_italic;
  text-placement:point;
  text-fill:@state_text;
  text-halo-fill: @state_halo;
  text-halo-radius: 1;
  [zoom=6] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=7] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>8] {
    text-halo-radius: 2;
  }
  [zoom=8] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=9] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=10] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

/* ---- Cities ------------------------------------------------------ */

#place::city[type='city'][zoom>=2][zoom<=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@city_text;
  text-halo-fill:@city_halo;
  text-halo-radius:2;
  [zoom<=8] {
    text-size: 10;
    text-halo-radius:1;
  }
  [zoom=9] {
    text-size:10;
    text-wrap-width: 60;
  }
  [zoom=10] {
    text-size:11;
    text-wrap-width: 70;
  }
  [zoom=11] {
    text-size:12;
    text-character-spacing: 1;
    text-wrap-width: 80;
  }
  [zoom=12] {
    text-size:13;
    text-character-spacing: 1;
    text-wrap-width: 100;
  }
  [zoom=13] {
    text-size:14;
    text-character-spacing: 2;
    text-wrap-width: 200;
    text-transform: uppercase;
  }
  [zoom=14] {
    text-size:15;
    text-character-spacing: 4;
    text-wrap-width: 300;
    text-transform: uppercase;
  }
  [zoom=15] {
    text-size:16;
    text-character-spacing: 6;
    text-wrap-width: 400;
    text-transform: uppercase;
  }
}

/* ---- Towns ------------------------------------------------------- */

#place::town[type='town'][zoom>=9][zoom<=17] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@town_text;
  text-size:9;
  text-halo-fill:@town_halo;
  text-halo-radius:1;
  text-wrap-width: 50;
  [zoom>=10] {
    text-halo-radius:2;
    text-size: 10;
  }
  [zoom>=11]{ text-size:11; }
  [zoom>=12]{
    text-size:12;
    text-line-spacing: 1;
  }
  [zoom>=13]{
    text-transform: uppercase;
    text-character-spacing: 1;
    text-line-spacing: 2;
  }
  [zoom>=14]{
    text-size:13;
    text-character-spacing: 2;
    text-line-spacing: 3;
  }
  [zoom>=15]{
    text-size:14;
    text-character-spacing: 3;
    text-line-spacing: 4;
  }
  [zoom>=15]{
    text-size:15;
    text-character-spacing: 4;
    text-line-spacing: 5;
  }
  [zoom>=17]{
    text-size:16;
    text-character-spacing: 5;
    text-line-spacing: 6;
  }
}

/* ---- Other small places ------------------------------------------ */

#place::small[type='village'][zoom>=13],
#place::small[type='suburb'][zoom>=13],
#place::small[type='hamlet'][zoom>=13]{
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@other_text;
  text-size:10;
  text-halo-fill:@other_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=14] {
    text-size:11;
    text-character-spacing: 1;
    text-wrap-width: 40;
    text-line-spacing: 1;
  }
  [zoom>=15] {
    text-halo-radius: 2;
    text-transform: uppercase;
    text-character-spacing: 1;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=16] {
    text-size:12;
    text-character-spacing: 2;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=17] {
    text-size:13;
    text-character-spacing: 3;
    text-wrap-width: 160;
    text-line-spacing: 4;
  }
  [zoom>=18] {
    text-size:14;
    text-character-spacing: 4;
    text-line-spacing: 6;
  }
}

#place::small[type='locality'][zoom>=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@locality_text;
  text-size:9;
  text-halo-fill:@locality_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=16] {
    text-size:10;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=17] {
    text-size:11;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=18] {
    text-size:12;
    text-character-spacing: 1;
    text-line-spacing: 4;
  }
}

/* ================================================================== */
/* AREA LABELS
/* ================================================================== */

#area_label[type='golf_course'][zoom>=10],
#area_label[type='park'][zoom>=10] {
  text-name: "''";
  text-fill: @park * 0.6;
  text-halo-fill: fadeout(@park,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom>=15][area>1600000],
  [zoom>=16][area>80000],
  [zoom>=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='cemetery'][zoom>=10] {
  text-name: "''";
  text-fill: @cemetery * 0.6;
  text-halo-fill: fadeout(@cemetery,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='hospital'][zoom>=10] {
  text-name: "''";
  text-fill: @hospital * 0.6;
  text-halo-fill: fadeout(lighten(@hospital,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='college'][zoom>=10],
#area_label[type='school'][zoom>=10],
#area_label[type='university'][zoom>=10] {
  text-name: "''";
  text-fill: @school * 0.6;
  text-halo-fill: fadeout(lighten(@school,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='water'][zoom>=10] {
  text-name: "''";
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-face-name:@sans_italic;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
    text-character-spacing: 1;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 2;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 3;
    text-wrap-width: 180;
  }
}

#poi[type='university'][zoom>=15],
#poi[type='hospital'][zoom>=16],
#poi[type='school'][zoom>=17],
#poi[type='library'][zoom>=17] {
  text-name:"[name]";
  text-face-name:@sans;
  text-size:10;
  text-wrap-width:30;
  text-fill: @poi_text;
}

/* Islands and islets */

#island_label_polygon {
  [zoom=10][area>2000000],
  [zoom=11][area>500000],
  [zoom=12][area>200000],
  [zoom=13][area>50000],
  [zoom=14][area>10000],
  [zoom=15][area>2500],
  [zoom>15][area>0] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// nodes with name and place=island/islet
#island_label_point {
  [zoom>=13] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

/* residential is often used as neighborhood name, block name and more*/

#area_label[type = 'residential']{
  [zoom=12][area>1280000],
  [zoom=13][area>640000],
  [zoom=14][area>320000],
  [zoom=15][area>240000],
  [zoom=16][area>90000],
  [zoom=17][area>10000],
  [zoom=18][area>=0] {
    text-name: "[name]";
    text-fill:@other_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@other_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

/* ================================================================== */
/* WATERWAY LABELS
/* ================================================================== */

#waterway_label[type='river'][zoom>=13],
#waterway_label[type='canal'][zoom>=15],
#waterway_label[type='stream'][zoom>=17] {
  text-name: '[name]';
  text-face-name: @sans_italic;
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-placement: line;
  text-min-distance: 400;
  text-size: 10;
  [type='river'][zoom=14],
  [type='canal'][zoom=16],
  [type='stream'][zoom=18] {
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom=15],
  [type='canal'][zoom=17] {
    text-size: 11;
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom>=16],
  [type='canal'][zoom=18] {
    text-size: 14;
    text-name: "[name].replace('([\S\ ])','$1 ')";
    text-spacing: 300;
  }
}

/* ================================================================== */
/* ROAD LABELS
/* ================================================================== */

#motorway_label[zoom>=11][zoom<=14][reflen<=8] {
  shield-name: "[ref]";
  shield-size: 9;
  shield-face-name: @sans_bold;
  shield-fill: #fff;
  shield-file: url(img/shield-motorway-1.png);
  [type='motorway'] {
    [reflen=1] { shield-file: url(img/shield-motorway-1.png); }
    [reflen=2] { shield-file: url(img/shield-motorway-2.png); }
    [reflen=3] { shield-file: url(img/shield-motorway-3.png); }
    [reflen=4] { shield-file: url(img/shield-motorway-4.png); }
    [reflen=5] { shield-file: url(img/shield-motorway-5.png); }
    [reflen=6] { shield-file: url(img/shield-motorway-6.png); }
    [reflen=7] { shield-file: url(img/shield-motorway-7.png); }
    [reflen=8] { shield-file: url(img/shield-motorway-8.png); }
  }
  [type='trunk'] {
    [reflen=1] { shield-file: url(img/shield-trunk-1.png); }
    [reflen=2] { shield-file: url(img/shield-trunk-2.png); }
    [reflen=3] { shield-file: url(img/shield-trunk-3.png); }
    [reflen=4] { shield-file: url(img/shield-trunk-4.png); }
    [reflen=5] { shield-file: url(img/shield-trunk-5.png); }
    [reflen=6] { shield-file: url(img/shield-trunk-6.png); }
    [reflen=7] { shield-file: url(img/shield-trunk-7.png); }
    [reflen=8] { shield-file: url(img/shield-trunk-8.png); }
  }
  [zoom=11] { shield-min-distance: 60; } //50
  [zoom=12] { shield-min-distance: 80; } //60
  [zoom=13] { shield-min-distance: 120; } //120
  [zoom=14] { shield-min-distance: 180; }
}

#motorway_label[type='motorway'][zoom>9],
#motorway_label[type='trunk'][zoom>9] {
  text-name:"[name]";
  text-face-name:@sans_bold;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:10;
  [zoom=11] { text-min-distance:70; }
  [zoom=12] { text-min-distance:80; }
  [zoom=13] { text-min-distance:100; }
}

#mainroad_label[type='primary'][zoom>12],
#mainroad_label[type='secondary'][zoom>13],
#mainroad_label[type='tertiary'][zoom>13] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

#minorroad_label[zoom>14] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-size:9;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

/* ================================================================== */
/* ONE-WAY ARROWS
/* ================================================================== */

#motorway_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16],
#mainroad_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16],
#minorroad_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16] {
  marker-placement:line;
  marker-max-error: 0.5;
  marker-spacing: 200;
  marker-file: url(img/icon/oneway.svg);
  [oneway=-1] { marker-file: url(img/icon/oneway-reverse.svg); }
  [oneway='reverse'] { marker-file: url(img/icon/oneway-reverse.svg); }
  [zoom=16] { marker-transform: "scale(0.5)"; }
  [zoom=17] { marker-transform: "scale(0.75)"; }
}

/* house names and numbers */

#housenumbers {
  [zoom >= 18] {
    text-name: "[addr:housenumber]";
    text-placement: interior;
    text-min-distance: 1;
    text-wrap-width: 0;
    text-face-name: @sans_lt;
    text-fill: #444;
    text-size: 9;
  }
}

#housenames {
  [zoom >= 17] {
    text-name: "[addr:housename]";
    text-placement: interior;
    text-wrap-width: 20;
    text-face-name: @sans_lt;
    text-size: 8;
    text-fill: #444;
    [zoom >= 18] {
      text-size: 9;
    }
  }
}

/* ****************************************************************** */