Skip to content

Instantly share code, notes, and snippets.

@jargnar
Last active May 4, 2017 03:35
Show Gist options
  • Save jargnar/1d672c8a0225b91ddfc58cb0aa9f8802 to your computer and use it in GitHub Desktop.
Save jargnar/1d672c8a0225b91ddfc58cb0aa9f8802 to your computer and use it in GitHub Desktop.
Example carto css
Map {
background-color: #444;
}
#countries {
::outline {
line-color: #aaa;
line-width: 1;
line-join: round;
}
polygon-fill: #222;
polygon-opacity: 0.8;
}
#roadswgs84 {
line-width:1;
line-color:#168;
}
#ne10mpopulatedplaces {
[zoom>=4][rank_max>14],
[zoom>=5][rank_max>13],
[zoom>=6][rank_max>12],
[zoom>=7][rank_max>11],
[zoom>=8][rank_max>10] {
text-name: [name];
text-face-name: 'Menlo Regular';
text-fill: #036;
text-size: 12;
text-halo-fill: fadeout(white, 20%);
text-halo-radius: 2;
}
}
#ne10mpopulatedplaces[zoom>6][megacity=1] {
}
#2011dist[zoom>8] {
text-name: [DISTRICT];
text-face-name: 'PT Serif Italic';
text-fill: #000;
text-size: 12;
text-halo-fill: fadeout(white, 10%);
text-halo-radius: 1.5;
line-color:#fff;
line-width:0.3;
}
#admin2 {
line-color:#eee;
line-width:0.4;
}
#stateinfo {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#bee;
}
#stateinfo[PROTECTION='National Park'] {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#180;
}
#stateinfo[PROTECTION='National park'] {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#180;
}
#stateinfo[zoom>7] {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#bee;
text-name: [NAME];
text-face-name: 'Arial Italic';
text-fill: #000;
text-size: 12;
text-halo-fill: fadeout(white, 10%);
text-halo-radius: 1.5;
}
#stateinfo[zoom>8] {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#bee;
text-name: [NAME];
text-face-name: 'Arial Italic';
text-fill: #000;
text-size: 14;
text-halo-fill: fadeout(white, 10%);
text-halo-radius: 1.5;
}
#stateinfo[zoom>7][PROTECTION='National Park'] {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#180;
text-name: [NAME];
text-face-name: 'Arial Italic';
text-fill: #000;
text-size: 12;
text-halo-fill: fadeout(white, 10%);
text-halo-radius: 1.5;
}
#stateinfo[zoom>8][PROTECTION='National Park'] {
line-color:#000;
line-width:0.5;
polygon-opacity:0.5;
polygon-fill:#180;
text-name: [NAME];
text-face-name: 'Arial Italic';
text-fill: #000;
text-size: 14;
text-halo-fill: fadeout(white, 10%);
text-halo-radius: 1.5;
}
#connectivityvector {
line-color:#594;
line-width:0.5;
polygon-opacity:0.2;
polygon-fill:#168;
}
#roadswgs84[RoadType='National Highway'] {
line-width:1;
line-color:#be4;
}
#roadswgs84 {
line-width:0.7;
line-color:#7a0;
}
#cipatchmetrics {
line-color:#594;
line-width:0.5;
polygon-opacity:1;
polygon-fill:#ae8;
}
#circuitcitigerdecile[DegreeOfCo=10] {
polygon-opacity:1;
polygon-fill:#3d049c;
}
#circuitcitigerdecile[DegreeOfCo=20] {
polygon-opacity:1;
polygon-fill:#6300a7;
}
#circuitcitigerdecile[DegreeOfCo=30] {
polygon-opacity:1;
polygon-fill:#8606A6;
}
#circuitcitigerdecile[DegreeOfCo=40] {
polygon-opacity:1;
polygon-fill:#a51f98;
}
#circuitcitigerdecile[DegreeOfCo=50] {
polygon-opacity:1;
polygon-fill:#c03a83;
}
#circuitcitigerdecile[DegreeOfCo=60] {
polygon-opacity:1;
polygon-fill:#D6546e;
}
#circuitcitigerdecile[DegreeOfCo=70] {
polygon-opacity:1;
polygon-fill:#e86f5a;
}
#circuitcitigerdecile[DegreeOfCo=80] {
polygon-opacity:1;
polygon-fill:#f68d45;
}
#circuitcitigerdecile[DegreeOfCo=90] {
polygon-opacity:1;
polygon-fill:#fdad32;
}
#circuitcitigerdecile[DegreeOfCo=100] {
polygon-opacity:1;
polygon-fill:#fcd224;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment