Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use common Single Quotes for Strings #4939

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -116,6 +116,27 @@ instead of
}
}
```
* Use the PostgreSQL quoting syntax for attributes (columns) and string-values of selectors.
Use no quotes or double quotes for attributes (columns) and single quotes for string-values.
For Example:

```mss
#layer[entrance = 'yes'] {
marker-width: 6.0;
}
#layer["generator:source" = 'wind'] {
marker-width: 8.0;
}
```
instead of
```mss
#layer[entrance = "yes"] {
marker-width: 6.0;
}
#layer['generator:source' = 'wind'] {
marker-width: 8.0;
}
```

## SQL style guidelines
Because SQL within JSON or YAML will not generally be syntax highlighted, indentation and caps are particularly important.
Expand Down
20 changes: 10 additions & 10 deletions style/buildings.mss
Expand Up @@ -52,29 +52,29 @@
marker-width: 5.0;
marker-height: 5.0;
marker-opacity: 0.0;
["entrance" = "main"] {
["entrance" = 'main'] {
marker-opacity: 1.0;
marker-file: url('symbols/square.svg');
}
}
[zoom >= 19]["entrance" != null] {
["entrance" = "yes"],
["entrance" = "main"],
["entrance" = "home"],
["entrance" = "service"],
["entrance" = "staircase"] {
["entrance" = 'yes'],
["entrance" = 'main'],
["entrance" = 'home'],
["entrance" = 'service'],
["entrance" = 'staircase'] {
marker-opacity: 1.0;
marker-width: 6.0;
marker-height: 6.0;
["entrance" = "service"] {
["entrance" = 'service'] {
marker-file: url('symbols/corners.svg');
}
}
["access" = "yes"],
["access" = "permissive"] {
["access" = 'yes'],
["access" = 'permissive'] {
marker-fill: @entrance-permissive;
}
["access" = "no"] {
["access" = 'no'] {
marker-fill: @entrance-normal;
marker-file: url('symbols/rectdiag.svg');
}
Expand Down
8 changes: 4 additions & 4 deletions style/landcover.mss
Expand Up @@ -816,10 +816,10 @@
//Also landuse = forest, converted in the SQL
[natural = 'wood'][zoom >= 13]::wood {
polygon-pattern-file: url('symbols/leaftype_unknown.svg'); // Lch(55,30,135)
[leaf_type = "broadleaved"] { polygon-pattern-file: url('symbols/leaftype_broadleaved.svg'); }
[leaf_type = "needleleaved"] { polygon-pattern-file: url('symbols/leaftype_needleleaved.svg'); }
[leaf_type = "mixed"] { polygon-pattern-file: url('symbols/leaftype_mixed.svg'); }
[leaf_type = "leafless"] { polygon-pattern-file: url('symbols/leaftype_leafless.svg'); }
[leaf_type = 'broadleaved'] { polygon-pattern-file: url('symbols/leaftype_broadleaved.svg'); }
[leaf_type = 'needleleaved'] { polygon-pattern-file: url('symbols/leaftype_needleleaved.svg'); }
[leaf_type = 'mixed'] { polygon-pattern-file: url('symbols/leaftype_mixed.svg'); }
[leaf_type = 'leafless'] { polygon-pattern-file: url('symbols/leaftype_leafless.svg'); }
polygon-pattern-alignment: global;
opacity: 0.4; // The entire layer has opacity to handle overlapping forests
}
Expand Down