-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #723 from pnorman/docs
Split off docs for contributors
- Loading branch information
Showing
2 changed files
with
50 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# OpenStreetMap Carto contribution guidelines | ||
|
||
## CartoCSS Style Guidelines | ||
|
||
* Always specify zoom levels as either >= or < . Don't use = or =< or > | ||
* Open curly braces on the same line, and close on an empty line. | ||
* One space before and after = etc | ||
* Two space indents. No tabs. | ||
* space after : but not before | ||
* Dashes, not underscores, in layer names | ||
* Name SQL subqueries after the layer name (but use underscores) | ||
* Avoid restating defaults, e.g. don't add `point-allow-overlap = false` | ||
* Avoid repeating the layer name for layers with mutiple attachments, i.e., prefer | ||
|
||
```css | ||
#layer { | ||
::outline { | ||
line-width: 6; | ||
line-color: black; | ||
} | ||
::inline { | ||
line-width: 2; | ||
line-color: white; | ||
} | ||
} | ||
``` | ||
instead of | ||
|
||
```css | ||
#layer::outline { | ||
line-width: 6; | ||
line-color: black; | ||
} | ||
#layer::inline { | ||
line-width: 2; | ||
line-color: white; | ||
} | ||
``` | ||
* Order the selectors in a style-sheet in rough order of importance (i.e., highway=primary, then highway=secondary) and beyond that, add layers that are rendered later (i.e., higher) lower in the file. | ||
|
||
## Previews | ||
|
||
Some changes benefit from a review from a wider audience. In most cases some static images are sufficient, but sometimes a demo layer is necessary. pnorman has a private server which can host layers and has some data from parts of the world loaded. Before requesting this in a pull request, make sure that you don't anticipate any more changes to it. | ||
|
||
This does not replace reviewing your changes in Tilemill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters