Skip to content

Instantly share code, notes, and snippets.

@ajashton
Created February 24, 2011 15:19
Show Gist options
  • Save ajashton/842279 to your computer and use it in GitHub Desktop.
Save ajashton/842279 to your computer and use it in GitHub Desktop.
/* ---- STATES & PROVINCES ---- */
#admin-1-labels[ADM0_A3="AUS"][zoom>=3],
#admin-1-labels[ADM0_A3="CAN"][zoom>=3],
#admin-1-labels[ADM0_A3="USA"][zoom>=3] {
text-face-name: "Franklin Gothic FS Book";
text-fill: rgba(0,0,0,0.25);
text-halo-radius: 1;
text-halo-fill: rgba(255,255,255,0.5);
text-transform: uppercase;
text-character-spacing: 1;
text-wrap-width: 50;
text-line-spacing: 1;
[zoom=3] { text-name: "[Postal]"; text-size: 10; }
[zoom=4] { text-name: "[Abbrev]"; text-size: 11; }
[zoom=5] { text-name: "[NAME_1]"; text-size: 12; }
[zoom>5] { text-name: "[NAME_1]"; text-size: 14; }
}
/* ---- CITIES ---- */
#city {
[SCALERANK<3][zoom>=3],
[SCALERANK=3][zoom>=4],
[SCALERANK=4][zoom>=5],
[SCALERANK=5][zoom>=6],
[SCALERANK=6][zoom>=6],
[SCALERANK=7][zoom>=7],
[SCALERANK=8][zoom>=8] {
text-name: "[NAME]";
text-face-name: "Franklin Gothic FS Medium";
text-size: 11;
text-fill: rgba(0,0,0,0.4);
text-halo-radius: 1;
text-halo-fill: rgba(255,255,255,0.4);
}
[zoom=4] {
[SCALERANK<3] { text-size: 12; }
}
[zoom=5] {
[SCALERANK<3] { text-size: 13; }
[SCALERANK=3] { text-size: 12; }
}
[zoom=6] {
[SCALERANK<3] { text-size: 14; }
[SCALERANK=3] { text-size: 13; }
[SCALERANK=4] { text-size: 12; }
}
[zoom=7] {
[SCALERANK<3] { text-size: 15; }
[SCALERANK=3] { text-size: 14; }
[SCALERANK=4] { text-size: 13; }
[SCALERANK=5] { text-size: 12; }
}
}
/* ---- MARINE ---- */
#marine-area {
[FeatureCla='ocean'][zoom>1][zoom<5],
::indent[FeatureCla='ocean'][zoom>1][zoom<5],
[ScaleRank=1][zoom>2],
::indent[ScaleRank=1][zoom>2],
[ScaleRank=2][zoom>3],
::indent[ScaleRank=2][zoom>3],
[ScaleRank=3][zoom>4],
::indent[ScaleRank=3][zoom>4] {
text-name: "[Name]";
text-face-name: "Franklin Gothic FS Medium Condensed Italic";
text-fill: rgba(0,96,128,0.3);
text-wrap-width: 40;
text-allow-overlap: true;
}
[zoom=2] {
[FeatureCla='ocean'],
::indent[FeatureCla='ocean'] {
text-size: 16;
text-character-spacing: 4;
text-line-spacing: 8;
}
}
[zoom=3] {
[FeatureCla='ocean'],
::indent[FeatureCla='ocean'] {
text-size: 24;
text-character-spacing: 6;
text-line-spacing: 12;
}
[ScaleRank=1],
::indent[ScaleRank=1] {
text-size: 14;
text-character-spacing: 2;
text-line-spacing: 4;
}
}
[zoom=4] {
[FeatureCla='ocean'],
::indent[FeatureCla='ocean'] {
text-size: 28;
text-character-spacing: 7;
text-line-spacing: 28;
}
[ScaleRank=1],
::indent[ScaleRank=1] {
text-size: 18;
text-character-spacing: 3;
text-line-spacing: 6;
}
[ScaleRank=2],
::indent[ScaleRank=2] {
text-size: 13;
text-character-spacing: 1;
text-line-spacing: 3;
}
}
[zoom=5] {
[ScaleRank=1],
::indent[ScaleRank=1] {
text-size: 20;
text-character-spacing: 4;
text-line-spacing: 8;
}
[ScaleRank=2],
::indent[ScaleRank=2] {
text-size: 14;
text-character-spacing: 2;
text-line-spacing: 4;
}
[ScaleRank=3],
::indent[ScaleRank=3] {
text-size: 13;
text-character-spacing: 1;
text-line-spacing: 3;
}
}
::indent[FeatureCla='ocean'][zoom>1][zoom<5],
::indent[ScaleRank=1][zoom>2],
::indent[ScaleRank=2][zoom>3],
::indent[ScaleRank=3][zoom>4] {
text-dy: 1;
text-vertical-alignment: middle;
text-fill:rgba(255,255,255,0.4);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment