Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

CartoCSS

CartoCSS - Programming language

< >

CartoCSS is a programming language created in 2010.

#752on PLDB 13Years Old 200Users
0Books 0Papers 477Repos


Example from Linguist:
@marina-text: #576ddf; // also swimming_pool @wetland-text: darken(#017fff, 10%); /* Also for marsh */ @mud-text: darken(#aea397, 20%); @shop-icon: #ac39ac; @transportation-icon: #0092da; @transportation-text: #0066ff; @airtransport: #8461C4; @landcover-font-size: 10; @landcover-font-size-big: 12; @landcover-font-size-bigger: 15; @landcover-wrap-width-size: 25; @landcover-wrap-width-size-big: 35; @landcover-wrap-width-size-bigger: 45; @landcover-face-name: @oblique-fonts; @standard-wrap-width: 30; .points { [feature = 'tourism_alpine_hut'][zoom >= 13] { point-file: url('symbols/alpinehut.p.16.png'); point-placement: interior; } [feature = 'amenity_shelter'][zoom >= 16] { point-file: url('symbols/shelter2.p.16.png'); point-placement: interior; } [feature = 'amenity_atm'][zoom >= 17] { point-file: url('symbols/atm2.p.16.png'); point-placement: interior; } [feature = 'amenity_bank'][zoom >= 17] { point-file: url('symbols/bank2.p.16.png'); point-placement: interior; } [feature = 'amenity_bar'][zoom >= 17] { point-file: url('symbols/bar.p.20.png'); point-placement: interior; } [feature = 'amenity_bicycle_rental'][zoom >= 17] { point-file: url('symbols/rental_bicycle.p.20.png'); point-placement: interior; } [feature = 'highway_bus_stop'] { [zoom >= 16] { marker-file: url('symbols/square.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-width: 6; } [zoom >= 17] { marker-file: url('symbols/bus_stop.p.12.png'); marker-width: 12; } } [feature = 'amenity_bus_station'][zoom >= 16] { point-file: url('symbols/bus_station.n.16.png'); point-placement: interior; } [feature = 'highway_traffic_signals'][zoom >= 17] { marker-file: url('symbols/traffic_light.svg'); marker-fill: #0a0a0a; marker-placement: interior; } [feature = 'amenity_cafe'][zoom >= 17] { point-file: url('symbols/cafe.p.1

Language features

Feature Supported Token Example
MultiLine Comments /* */
/* A comment
*/
Comments
// A comment
Line Comments //
// A comment
Semantic Indentation X
graph-it.html · cartocss.html · sugarss.html

View source

- Build the next great programming language · Search · Day 212 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com