Changes between Version 196 and Version 268 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v196 v268  
    77* [wikitr:/Rules Validator rules], see [wikitr:/Help/Validator/MapCSSTagChecker MapCSS tag checker] for the special part for rules only.
    88* [wikitr:/Help/Action/Search Search dialog]
     9
     10Consider installing the [https://marketplace.visualstudio.com/items?itemName=whammo.mapcss-syntax MapCSS Syntax Highlighter] in VS Code to add visual highlighting for MapCSS paint and validator syntax.
    911
    1012== General Structure ==
     
    1921    set: class;
    2022    set: .class;
     23    /* note that validator rules do not use the colon after set */
    2124}
    2225}}}
     
    3841}}}
    3942
    40 == Selectors ==
    41 ''Selectors'' denote the filter expressions of a MapCSS rule. The rule is only applied to a map object, if its selectors match
    42 with the object.
    43 
    44 Selectors in MapCSS are different from standard CSS for the web. MapCSS only supports a subset of the standard CSS selectors, but
    45 extends them with additional selectors required for OSM data.
     43
     44== Selectors == #Selectors
     45''Selectors'' denote the filter expressions of a MapCSS rule. The rule is only applied to a map object, if its selectors match with the object.
     46
     47Selectors in MapCSS are different from standard CSS for the web. MapCSS only supports a subset of the standard CSS selectors, but extends them with additional selectors required for OSM data.
    4648
    4749Some basic examples:
     
    6668
    6769=== Type selector ===
    68 
    6970{{{#!th valign=top
    7071'''Selector'''
     
    8283|-------------------------------------------------------------------------------
    8384{{{#!td align=center  valign=top
    84 {{{node}}}, {{{way}}}, {{{relation}}}
     85`node`, `way`, `relation`
    8586}}}
    8687{{{#!td align=left  valign=top   
     
    8990|-------------------------------------------------------------------------------
    9091{{{#!td align=center  valign=top
    91 {{{area}}}
     92`area`
    9293}}}
    9394{{{#!td align=left  valign=top   
     
    99100way[natural=beach], relation[type=multipolygon][natural=beach] {...}
    100101}}}
    101 Note that {{{area}}} selects unclosed ways as well, so it may be useful to add the {{{:closed}}} pseudo class. The JOSM Validator will give a warning for unclosed ways that have an area style.
     102Note that `area` selects unclosed ways as well, so it may be useful to add the `:closed` pseudo class. The JOSM Validator will give a warning for unclosed ways that have an area style.
    102103}}}
    103104|-------------------------------------------------------------------------------
    104105{{{#!td align=center  valign=top
    105 {{{meta}}}
     106`meta`
    106107}}}
    107108{{{#!td align=left  valign=top   
    108 The {{{meta}}} selector starts a special rule that should stand at the beginning of the file. It gives some general information on the style sheet. All software that supports MapCSS should be able to parse this sections without errors, so do not use exotic syntax extensions in this part.
     109The `meta` selector starts a special rule that should stand at the beginning of the file. It gives some general information on the style sheet. All software that supports MapCSS should be able to parse this sections without errors, so do not use exotic syntax extensions in this part.
    109110{{{
    110111#!mapcss
     
    122123|-------------------------------------------------------------------------------
    123124{{{#!td align=center  valign=top
    124 {{{canvas}}}
     125`canvas`
    125126}}}
    126127{{{#!td align=left  valign=top   
     
    148149|-
    149150{{{#!td align=center
    150 {{{fill-color}}}
     151`fill-color`
    151152}}}
    152153{{{#!td
     
    157158}}}
    158159{{{#!td align=center
    159 {{{black}}}
     160`black`
    160161}}}
    161162|-
    162163{{{#!td align=center
    163 {{{default-points}}}
     164`default-points`
    164165}}}
    165166{{{#!td
     
    170171}}}
    171172{{{#!td align=center
    172 {{{true}}}
     173`true`
    173174}}}
    174175|-
    175176{{{#!td align=center
    176 {{{default-lines}}}
     177`default-lines`
    177178}}}
    178179{{{#!td
     
    183184}}}
    184185{{{#!td align=center
    185 {{{true}}}
     186`true`
    186187}}}
    187188}}}
     
    206207* The functions ''prop()'' and ''is_prop_set()'' are only supported on the right side of the > sign.
    207208* The functions ''parent_tag'' and ''parent_tags'' (see below) can be used to access tags from the parent(s).
    208 * For compatibility with the MapCSS 0.2 standard, `relation[type=route][route=foot] way {/*...*/}`, without the greater-than-sign `>` is supported, too. However, no [[#Linkselector]] may be specified in this case.
    209 
     209* For compatibility with the MapCSS 0.2 standard, `relation[type=route][route=foot] way {/*...*/}`, without the greater-than-sign `>` is supported, too. However, no [#LinkSelector Link selector] may be specified in this case.
    210210
    211211=== Parent selector ===
     
    226226
    227227=== Condition selector ===
    228 Selectors can include a set of conditions. If any of these conditions evaluates to false, the selector doesn't match and the style
    229 rule isn't applied.
    230 
    231 An '''attribute condition''' specifies a condition on a tag of an OSM object.
     228Selectors can include a set of conditions. If any of these conditions evaluates to false, the selector doesn't match and the style rule isn't applied.
     229
     230An '''attribute condition''' specifies a condition on a tag of an OSM object.
    232231
    233232[=#condition_selector_operators]
    234 {{{#!th valign=top 
     233{{{#!th valign=top
    235234'''Operator'''
    236235}}}
     
    242241}}}
    243242|-------------------------------------------------------------------------------
    244 {{{#!td align=center  valign=top
     243{{{#!td align=center valign=top
    245244`=`
    246245}}}
    247 {{{#!td align=left  valign=top   
     246{{{#!td align=left valign=top
    248247Exact match of the value.
    249248}}}
    250 {{{#!td align=left  valign=top   
    251 {{{
    252 #!mapcss
    253 way[highway=residential]                    /* is case sensitive, i.e. does NOT match e.g. highway=Residential or Highway=residential */
    254 node[name="My name"]                        /* use quotes if key or value includes spaces */
    255 node["name:ru"="Калининград"]               /* use quotes if key or value includes special characters like colons or unicode characters */
    256 }}}
    257 }}}
    258 |-------------------------------------------------------------------------------
    259 {{{#!td align=center  valign=top
     249{{{#!td align=left valign=top
     250{{{
     251#!mapcss
     252way[highway=residential]                    /* is case sensitive, i.e. does NOT match e.g. highway=Residential or Highway=residential   */
     253node[name="My name"]                        /* use quotes if key or value includes spaces                                               */
     254node["name:pl"="Królewiec"]                 /* use quotes if key or value includes special characters like colons or unicode characters */
     255}}}
     256}}}
     257|-------------------------------------------------------------------------------
     258{{{#!td align=center valign=top
    260259`!=`
    261260}}}
    262 {{{#!td align=left  valign=top   
    263 Value not equal 
    264 }}}
    265 {{{#!td align=left  valign=top   
     261{{{#!td align=left valign=top
     262Value not equal
     263}}}
     264{{{#!td align=left valign=top
    266265{{{
    267266#!mapcss
    268267way[highway!=residential]
    269268node[name!="My name"]
    270 node["name:ru"!="Калининград"]
    271 }}}
    272 }}}
    273 |-------------------------------------------------------------------------------
    274 {{{#!td align=center  valign=top
     269node["name:pl"!="Królewiec"]
     270}}}
     271}}}
     272|-------------------------------------------------------------------------------
     273{{{#!td align=center valign=top
    275274`<`, `>`, `<=`, `>=`
    276275}}}
    277 {{{#!td align=left  valign=top   
    278 Comparision for numeric values.
    279 
    280 }}}
    281 {{{#!td align=left  valign=top   
     276{{{#!td align=left valign=top
     277Comparison for numeric values.
     278
     279}}}
     280{{{#!td align=left valign=top
    282281{{{
    283282#!mapcss
    284283node[population >= 50000]                   /* population greater than or equal to 50000 */
    285 node[ele = 3000]                            /* elevation with exactly 3000 meters */
    286 }}}
    287 }}}
    288 |-------------------------------------------------------------------------------
    289 {{{#!td align=center  valign=top
    290 {{{^=}}}
    291 }}}
    292 {{{#!td align=left  valign=top   
     284node[ele = 3000]                            /* elevation with exactly 3000 meters        */
     285}}}
     286}}}
     287|-------------------------------------------------------------------------------
     288{{{#!td align=center valign=top
     289`^=`
     290}}}
     291{{{#!td align=left valign=top
    293292Prefix match
    294293}}}
    295 {{{#!td align=left  valign=top   
     294{{{#!td align=left valign=top
    296295{{{
    297296#!mapcss
     
    300299}}}
    301300|-------------------------------------------------------------------------------
    302 {{{#!td align=center  valign=top
     301{{{#!td align=center valign=top
    303302`$=`
    304303}}}
    305 {{{#!td align=left  valign=top   
     304{{{#!td align=left valign=top
    306305Postfix match
    307306}}}
    308 {{{#!td align=left  valign=top   
     307{{{#!td align=left valign=top
    309308{{{
    310309#!mapcss
     
    313312}}}
    314313|-----------------------------------------------
    315 {{{#!td align=center  valign=top
     314{{{#!td align=center valign=top
    316315`*=`
    317316}}}
    318 {{{#!td align=left  valign=top   
     317{{{#!td align=left valign=top
    319318Substring match
    320319}}}
    321 {{{#!td align=left  valign=top   
     320{{{#!td align=left valign=top
    322321{{{
    323322#!mapcss
     
    326325}}}
    327326|-------------------------------------------------------------------------------
    328 {{{#!td align=center  valign=top
     327{{{#!td align=center valign=top
    329328`~=`
    330329}}}
    331 {{{#!td align=left  valign=top   
     330{{{#!td align=left valign=top
    332331List membership
    333332}}}
    334 {{{#!td align=left  valign=top   
    335 {{{
    336 #!mapcss
    337 *[vending~=stamps]                          /* the tag value for the tag 'vending' consists of a list of ;-separated values    */
    338                                             /* and one of these values is 'stamps'                                             */
    339 }}}
    340 }}}
    341 |-------------------------------------------------------------------------------
    342 {{{#!td align=center  valign=top
     333{{{#!td align=left valign=top
     334{{{
     335#!mapcss
     336*[vending~=stamps]                          /* the tag value for the tag 'vending' consists of a list of ;-separated values */
     337                                            /* and one of these values is 'stamps'                                          */
     338}}}
     339}}}
     340|-------------------------------------------------------------------------------
     341{{{#!td align=center valign=top
    343342`=~`
    344343}}}
    345 {{{#!td align=left  valign=top   
    346 [https://download.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#sum Regular expression] match
    347 
    348 }}}
    349 {{{#!td align=left  valign=top   
     344{{{#!td align=left valign=top
     345[https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html#sum Regular expression] match
     346
     347}}}
     348{{{#!td align=left valign=top
    350349{{{
    351350#!mapcss
    352351*[name=~/^My_pattern.*/]                    /* the value of the tag 'name' matches with the regular expression '^My_pattern.*' */
    353                                             /* Note, that reqular expressions have to be enclosed in /.../                     */                 
    354 }}}
    355 Case-insensitive matching can be enabled via the embedded flag expression `(?i)` (see [https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#CASE_INSENSITIVE Pattern.CASE_INSENSITIVE]).
    356 {{{
    357 #!mapcss
    358 *[name =~ /^(?i)(parking)$/]                 /* matches parking, Parking, PARKING, PaRkInG,... */ 
    359 *[name =~ /^(?U)(\p{Lower})+$/]              /* name consists of only lower case unicode characters */                 
    360 }}}
    361 }}}
    362 |-------------------------------------------------------------------------------
    363 {{{#!td align=center  valign=top
     352                                            /* Note, that reqular expressions have to be enclosed in /.../                     */
     353}}}
     354Case-insensitive matching can be enabled via the embedded flag expression `(?i)` (see [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html#CASE_INSENSITIVE Pattern.CASE_INSENSITIVE]).
     355{{{
     356#!mapcss
     357*[name =~ /^(?i)(parking)$/]                 /* matches parking, Parking, PARKING, PaRkInG,...      */
     358*[name =~ /^(?U)(\p{Lower})+$/]              /* name consists of only lower case unicode characters */
     359}}}
     360}}}
     361|-------------------------------------------------------------------------------
     362{{{#!td align=center valign=top
    364363`!~` (since r6455)
    365364}}}
    366 {{{#!td align=left  valign=top   
    367 negated [https://download.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#sum Regular expression] match
    368 
    369 }}}
    370 {{{#!td align=left  valign=top   
     365{{{#!td align=left valign=top
     366negated [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html#sum Regular expression] match
     367
     368}}}
     369{{{#!td align=left valign=top
    371370{{{
    372371#!mapcss
     
    375374}}}
    376375|-------------------------------------------------------------------------------
    377 {{{#!td align=center  valign=top
     376{{{#!td align=center valign=top
    378377`∈` ([https://www.fileformat.info/info/unicode/char/2208/index.htm U+2208], since r6609)
    379378}}}
    380 {{{#!td align=left  valign=top   
     379{{{#!td align=left valign=top
    381380element of
    382381
    383382Matches when an object matches the right selector(s) contains at least one element which match the left selector(s).
    384 
    385 }}}
    386 {{{#!td align=left  valign=top   
     383}}}
     384{{{#!td align=left valign=top
    387385{{{
    388386#!mapcss
     
    391389}
    392390}}}
    393 Finds areas with `amenity=parking` that contain at least one node or area with `amenity=parking`.
    394 Since r15064 this rule produces one warning for each element on the left when there are multiple matches.
    395 }}}
    396 |-------------------------------------------------------------------------------
    397 {{{#!td align=center  valign=top
     391Finds areas with `amenity=parking` that contain at least one node or area with `amenity=parking`. Since r15064 this rule produces one warning for each element on the left when there are multiple matches.
     392}}}
     393|-------------------------------------------------------------------------------
     394{{{#!td align=center valign=top
    398395`⊆` ([https://www.fileformat.info/info/unicode/char/2286/index.htm U+2286], since r15102)
    399396}}}
    400 {{{#!td align=left  valign=top   
     397{{{#!td align=left valign=top
    401398Subset of or Equal To
    402399
    403400Synonym for `∈`.
    404401}}}
    405 {{{#!td align=left  valign=top   
     402{{{#!td align=left valign=top
    406403{{{
    407404#!mapcss
     
    413410}}}
    414411|-------------------------------------------------------------------------------
    415 {{{#!td align=center  valign=top
     412{{{#!td align=center valign=top
    416413`⊇` ([https://www.fileformat.info/info/unicode/char/2287/index.htm U+2287], since r15102)
    417414}}}
    418 {{{#!td align=left  valign=top   
     415{{{#!td align=left valign=top
    419416Superset of or Equal To
    420417
    421418Matches when an object matches the right selector(s) and is contained in one or more elements which match the left selectors.
    422 
    423 }}}
    424 {{{#!td align=left  valign=top   
    425 {{{
    426 #!mapcss
    427 area[amenity=parking] ⊇ *[amenity=parking]
     419}}}
     420{{{#!td align=left valign=top
     421{{{
     422#!mapcss
     423area[amenity=parking] ⊇ *[amenity=parking]
    428424}}}
    429425finds nodes or areas with `amenity=parking` inside areas with `amenity=parking`. Slower than `⊆` and thus not useful in validator rules, but can be useful in the search dialog.
    430 
    431 }}}
    432 |-------------------------------------------------------------------------------
    433 {{{#!td align=center  valign=top
     426}}}
     427|-------------------------------------------------------------------------------
     428{{{#!td align=center valign=top
    434429`⊈` ([https://www.fileformat.info/info/unicode/char/2288/index.htm U+2288], since r15102)
    435430}}}
    436 {{{#!td align=left  valign=top   
     431{{{#!td align=left valign=top
    437432Neither a Subset of nor Equal To
    438433
    439434Matches when an object matches the right selector(s) and does not contain any element which matches the left selectors.
    440 
    441 }}}
    442 {{{#!td align=left  valign=top   
     435}}}
     436{{{#!td align=left valign=top
    443437{{{
    444438#!mapcss
    445439*[highway=street_lamp] ⊈ area:closed2[amenity=parking][lit=yes]
    446440}}}
    447 finds areas amenity=parking that have lit=yes but don't contain a lamp.
    448 Always add `:closed2` to avoid false positives as unclosed areas never contain something.
    449 }}}
    450 |-------------------------------------------------------------------------------
    451 {{{#!td align=center  valign=top
     441finds areas amenity=parking that have lit=yes but don't contain a lamp. Always add `:closed2` to avoid false positives as unclosed areas never contain something.
     442}}}
     443|-------------------------------------------------------------------------------
     444{{{#!td align=center valign=top
    452445`⊉` ([https://www.fileformat.info/info/unicode/char/2289/index.htm U+2289], since r15102)
    453446}}}
    454 {{{#!td align=left  valign=top   
     447{{{#!td align=left valign=top
    455448Neither a Superset of nor Equal To
    456449
    457450Matches when an object matches the right selector(s) and is not contained in any area which matches the left selectors.
    458 
    459 }}}
    460 {{{#!td align=left  valign=top   
     451}}}
     452{{{#!td align=left valign=top
    461453{{{
    462454#!mapcss
    463455area[landuse=residential] ⊉ *[building]
    464456}}}
    465 finds buildings which are not inside any landuse=residential area. Note that this operator is likely to produce false positives
    466 when you have `landuse=residential`areas which don't match `:closed2`.
    467 }}}
    468 |-------------------------------------------------------------------------------
    469 {{{#!td align=center  valign=top
     457finds buildings which are not inside any landuse=residential area. Note that this operator is likely to produce false positives when you have `landuse=residential`areas which don't match `:closed2`.
     458}}}
     459|-------------------------------------------------------------------------------
     460{{{#!td align=center valign=top
    470461`⧉` ([https://www.fileformat.info/info/unicode/char/29c9/index.htm U+29C9], since r6613)
    471462}}}
    472 {{{#!td align=left  valign=top   
     463{{{#!td align=left valign=top
    473464crossing
    474 
    475 }}}
    476 {{{#!td align=left  valign=top   
     465}}}
     466{{{#!td align=left valign=top
    477467{{{
    478468#!mapcss
     
    518508|-------------------------------------------------------------------------------
    519509{{{#!td align=left  valign=top
    520 Presence of tag by [https://download.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#sum Regular expression] match (since r6547)
     510Presence of tag by [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html#sum Regular expression] match (since r6547)
    521511}}}
    522512{{{#!td align=left  valign=top   
     
    553543{{{
    554544#!mapcss
    555 way[oneway?]                  /* matches any way with a truth value in the tag 'oneway'  */
     545way[oneway?]                   /* matches any way with a truth value in the tag 'oneway' */
    556546}}}
    557547}}}
     
    563553{{{
    564554#!mapcss
    565 way[oneway?!]                  /* matches any way with a false value in the tag 'oneway'  */
    566 }}}
    567 }}}
    568 
    569 === Territory selector ===
    570 
    571 You can test whether an object is located inside or outside of a specific territory. JOSM has an internal database for this. The [source:/trunk/resources/data/boundaries.osm territories file] can be downloaded and opened in JOSM to investigate it [attachment:boundaries.png (screenshot preview)]. It contains borders of all countries of the world. Due to performance reasons the borders are simplified. They can be refined for special cases on request. The territories are "tagged" with their [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO_3166-1_alpha-2 codes]. USA, Canada, China, India and Australia have additional boundaries for their subdivisions. See the following examples on how to use the territory selectors. Territory selectors are less useful in mappaint styles and can be very resource heavy there. However they are much more useful for [wikitr:/Help/Validator/MapCSSTagChecker mapcss based validator rules]. To select territories with left-hand-traffic or right-hand-traffic, there is a simpler way, see [#PseudoClasses]. See #10387 for main implementation of this feature.
     555way[oneway?!]                  /* matches any way with a false value in the tag 'oneway' */
     556}}}
     557}}}
     558
     559=== Territory selector === #Territoryselector
     560You can test whether an object is located inside or outside of a specific territory. JOSM has an internal database for this. The [source:/trunk/resources/data/boundaries.osm territories file] can be downloaded and opened in JOSM to investigate it [attachment:boundaries.png (screenshot preview)]. It contains borders of all countries of the world. Due to performance reasons the borders are simplified. They can be refined for special cases on request. The territories are "tagged" with their [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO_3166-1_alpha-2 codes]. USA, Canada, China, India and Australia have additional boundaries for their subdivisions. See the following examples on how to use the territory selectors. Territory selectors are less useful in mappaint styles and can be very resource heavy there. However they are much more useful for [wikitr:/Help/Validator/MapCSSTagChecker mapcss based validator rules]. To select territories with left-hand-traffic or right-hand-traffic, there is a simpler way, see [#PseudoClasses Pseudo Classes]. See #10387 for main implementation of this feature.
    572561
    573562{{{
     
    586575}}}
    587576
    588 === Link selector ===
     577=== Link selector ===#LinkSelector
    589578In a child selector, you can formulate conditions on the link between a parent and a child object.
    590579
     
    611600}}}
    612601{{{#!td align=left  valign=top   
    613 Exact match of the role name. The name name {{{role}}} is compulsory in this context.
     602Exact match of the role name. The name `role` is compulsory in this context.
    614603}}}
    615604{{{#!td align=left  valign=top   
     
    621610}}}
    622611
    623 The operators {{{!=, ^=, $=, *=, and ~=}}} are supported too. Please refer to [#condition_selector_operators condition selector operators].
    624 
    625 Nodes in ways and members in relations are ordered. You can formulate conditions on the position of a node in a way or a member
    626 object in a relation. Positive numbers count from first to last element, negative numbers (since r8236) count from last to first element.
     612The operators `!=`, `^=`, `$=`, `*=` and `~=` are supported too. Please refer to [#condition_selector_operators condition selector operators].
     613
     614Nodes in ways and members in relations are ordered. You can formulate conditions on the position of a node in a way or a member object in a relation. Positive numbers count from first to last element, negative numbers (since r8236) count from last to first element.
    627615
    628616{{{
     
    642630}}}
    643631
    644 
    645632=== Zoom selector ===
    646 You can decorate a type selector with a '''zoom selector'''. The zoom selector restricts the range of zoom levels
    647 at which the respective MapCSS rule is applied.
    648 
    649 {{{#!th align=center valign=top
    650 '''Example'''
    651 }}}
    652 {{{#!th align=center valign=top
    653 '''Description'''
    654 }}}
    655 |-------------------------------------------------------------------------------
    656 || {{{way|z12 {...} }}} || At zoom level 12 ||
    657 || {{{way|z13-15 {...} }}} || From 13 to 15 ||
    658 || {{{way|z16- {...} }}} || 16 and above ||
    659 || {{{way|z-12 {...} }}} || 12 and below ||
    660 || {{{way {...} }}} || any zoom level ||
     633You can decorate a type selector with a '''zoom selector'''. The zoom selector restricts the range of zoom levels at which the respective MapCSS rule is applied.
     634||= '''Example 1''' =||= '''Example 2''' =||= '''Example 3''' =||= '''Description''' =||
     635|| `way|z12 {...}` || `node|z12 {...}` || `node|z12[...] {...}` || At zoom level 12 ||
     636|| `way|z13-15 {...}` || `node|z13-15 {...}` || `way|z13-15[...] {...}` ||From 13 to 15 ||
     637|| `way|z16- {...}` || `node|z16- {...}` || `node|z16-[...] {...}` || 16 and above ||
     638|| `way|z-12 {...}` || `node|z-12 {...}` || `node|z-12[...] {...}` || 12 and below ||
     639|| `way {...}` || `node{...}` || `way[...] {...}` || any zoom level ||
    661640
    662641The precise definition of scale ranges for each zoom level may change in the future. By rule of thumb you can expect to be approximately at zoom level ''n'' when imagery displays slippymap tiles of level ''n''.
    663642
    664 
    665 === Pseudo Classes ===
     643=== Pseudo Classes ===#PseudoClasses
    666644See [/doc/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.PseudoClasses.html Javadoc] for the up-to-date list of pseudo classes supported by JOSM's MapCSS implementation.
    667645
    668 ||= Class =||= Description =||
    669 || {{{:closed}}} || true for ways where the first node is the same as the last and for any (completely downloaded) multipolygon relation ||
    670 || {{{:closed2}}} || same as above, but this one ignores if a multipolygon is downloaded completely (since r9099) ||
    671 || {{{:completely_downloaded}}} || true for a relation whose members are all downloaded (since r9099) ||
    672 || {{{:new}}} || all new objects ||
    673 || {{{:connection}}} || true for nodes that are used by more than one way ||
    674 || {{{:unconnected}}} || true for nodes that are not used by any way (since r6687) ||
    675 || {{{:tagged}}} || What JOSM considers tagged, i.e. an object that with a tag key other than the following: {{{source*, source_ref, note, comment, converted_by, created_by, watch*, fixme, FIXME, description, attribution}}} (version r4008; in this list, {{{*}}} is a glob)
    676 || {{{:righthandtraffic}}} || true if there is right-hand traffic at the current location (since r7193); see [wikitr:/left-right-hand-traffic left-right-hand-traffic] for screenshot of areas ||
    677 || {{{:clockwise}}} || Whether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order. ||
    678 || {{{:anticlockwise}}} || Whether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order. ||
    679 || {{{:unclosed_multipolygon}}} || true for fully loaded unclosed multipolygon relations (since r8252) ||
    680 || {{{:open_end}}} || to select end nodes of unclosed multipolygon relations with `relation:unclosed_multipolygon >:open_end node` (since r8252) ||
    681 || {{{:in-downloaded-area}}} || true if an object is within source area and false if in the hatched area (since r8495). ||
    682 || {{{:selected}}} || true if an object is selected in the editor (since r9341). ||
    683 || {{{:modified}}} || changed and new objects (since r7193). ||
    684 You can also negate pseudo classes. E.g. {{{!:new}}} for all old objects.
     646||= '''Class''' =||= '''Description''' =||
     647|| `:closed` || true for ways where the first node is the same as the last and for any (completely downloaded) multipolygon relation ||
     648|| `:closed2` || same as above, but this one ignores if a multipolygon is downloaded completely (since r9099) ||
     649|| `:completely_downloaded` || true for a relation whose members are all downloaded (since r9099) ||
     650|| `:new` || all new objects ||
     651|| `:connection` || true for nodes that are used by more than one way ||
     652|| `:unconnected` || true for nodes that are not used by any way (since r6687) ||
     653|| `:tagged` || What JOSM considers tagged, i.e. an object that with a tag key other than the following: `source*`, `source_ref`, `note`, `comment`, `converted_by`, `created_by`, `watch*`, `fixme`, `FIXME`, `description`, `attribution` (version r4008; in this list, `*` is a glob)
     654|| `:area-style` || true if the object has an area style ||
     655|| `:righthandtraffic` || true if there is right-hand traffic at the current location (since r7193); see [wikitr:/left-right-hand-traffic left-right-hand-traffic] for screenshot of areas ||
     656|| `:clockwise` || Whether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order. ||
     657|| `:anticlockwise` || Whether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order. ||
     658|| `:unclosed_multipolygon` || true for fully loaded unclosed multipolygon relations (since r8252) ||
     659|| `:open_end` || to select end nodes of unclosed multipolygon relations with `relation:unclosed_multipolygon >:open_end node` (since r8252) ||
     660|| `:in-downloaded-area` || true if an object is within source area and false if in the hatched area (since r8495). ||
     661|| `:selected` || true if an object is selected in the editor (since r9341). ||
     662|| `:highlighted` || true if the object is highlighted ||
     663|| `:modified` || changed and new objects (since r7193). ||
     664You can also negate pseudo classes. E.g. `!:new` for all old objects.
    685665
    686666=== Layer Identifier ===
    687 
    688667Layers can be used to create more than one style for a single object. Here is an example:
    689668{{{
     
    713692}
    714693}}}
    715 This draws all secondary and tertiary roads in yellow and orange respectively. Any road with an access tag other than yes will get an extra line style below ('''{{{object-z-index:-1.0;}}}''') the main line. If that part of the street happens to be a bridge, it will also get a half transparent blue overlay. The relative width value ('''{{{width: +2;}}}''') refers to the width on the default layer (2 or 3 in this case).
     694This draws all secondary and tertiary roads in yellow and orange respectively. Any road with an access tag other than yes will get an extra line style below ('''`object-z-index:-1.0;`''') the main line. If that part of the street happens to be a bridge, it will also get a half transparent blue overlay. The relative width value ('''`width: +2;`''') refers to the width on the default layer (2 or 3 in this case).
    716695
    717696The name for the layer can be any identifier.
    718697
    719 If you omit the layer in the selector, this is the same as using {{{::default}}}.
     698If you omit the layer in the selector, this is the same as using `::default`.
    720699
    721700One more example:
     
    740719[[Image(multiple_icons_and_texts.png,link=)]]
    741720
    742 In addition, you can use the * layer to override and initialize all layers.[[br]]
     721In addition, you can use the * layer to override and initialize all layers. \\
    743722It overrides all existing subparts, so
    744723
     
    747726way::A { a; }
    748727way::B { b; }
    749 way::* { c; }
     728way::* { c; }  /* overrides all existing subparts */
    750729}}}
    751730is equivalent to
     
    754733way::A { a; }
    755734way::B { b; }
    756 way::A { c; }
    757 way::B { c; }
     735way::A { c; } /* overrides a with c all existing subparts */
     736way::B { c; } /* overrides b with c all existing subparts */
    758737}}}
    759738And it initializes new subparts. In other words:
     
    781760way::A { a; b; }
    782761}}}
    783 
    784762
    785763=== Grouping ===
     
    822800way.path { text:auto; text-color: green; text-position: line; text-offset: 5; }
    823801}}}
    824 You can also negate classes. E.g. {{{way!.path}}} for all ways, which are not part of the class ''.path''.
    825 
     802You can also negate classes. E.g. `way!.path` for all ways, which are not part of the class ''.path''.
     803
     804=== Classes and Layer together ===
     805If you want to use layer and classes together, please note that you have to identify the class via is_prop_set.
     806
     807{{{#!mapcss
     808node[railway=signal] { set sgnl; }
     809
     810/* it doesn't work */
     811node.sgnl::layer_signal_icon  { z-index: 1000; ... icon: icon/signal-icon.svg; ... }
     812node.sgnl::layer_signal_text  { z-index: 1010; ... text: concat("Name of signal: ", tag("ref")); ..... )
     813
     814/* use instead: is_prop_set("...", "default") */
     815node[is_prop_set("sgnl", "default")]::layer_signal_icon  { z-index: 1000; ... icon: icon/signal-icon.svg; ... }
     816node[is_prop_set("sgnl", "default")]::layer_signal_text  { z-index: 1010; ... text: concat("Name of signal: ", tag("ref")); ..... )
     817}}}
    826818
    827819=== @supports Conditional Processing  ===
     
    875867}}}
    876868{{{#!td
    877 Only include {{{@supports}}} section when the current version of JOSM is greater than or equal to the specified number.
     869Only include `@supports` section when the current version of JOSM is greater than or equal to the specified number.
    878870}}}
    879871|-
     
    882874}}}
    883875{{{#!td
    884 Only include {{{@supports}}} section when the current version of JOSM is lower than or equal to the specified number.
     876Only include `@supports` section when the current version of JOSM is lower than or equal to the specified number.
    885877}}}
    886878|-
     
    889881}}}
    890882{{{#!td
    891 Only include {{{@supports}}} section when the name of the editor / renderer matches the given string. In JOSM, the only accepted value is {{{josm}}}.
    892 }}}
    893 
    894 Conditions can be combined with {{{and}}}:
     883Only include `@supports` section when the name of the editor / renderer matches the given string. In JOSM, the only accepted value is `josm`.
     884}}}
     885
     886Conditions can be combined with `and`:
    895887
    896888{{{
     
    901893}}}
    902894
    903 Other logical operators like {{{or}}} and {{{not}}} can also be used. Parentheses are needed if you want to combine different logical operators:
     895Other logical operators like `or` and `not` can also be used. Parentheses are needed if you want to combine different logical operators:
    904896
    905897{{{
     
    920912}}}
    921913
     914
    922915== Style settings ==
    923 
    924916[wikitr:/Help/Dialog/MapPaint/StyleSettings Styles settings] are used to provide the user settings to customize a mappaint style. The user can use them in the [wikitr:/Help/Dialog/MapPaint MapPaint dialog]. The following `type` of settings are available:
    925917* `boolean` (since r7450)
     
    929921
    930922=== Settings of type `boolean` ===
    931 
    932923Create a setting of type `boolean`:
    933924{{{
     
    950941
    951942=== Settings of type `double` ===
    952 
    953943Create a setting of type `double`:
    954944{{{
     
    970960
    971961=== Settings of type `string` ===
    972 
    973962Create a setting of type `string`:
    974963{{{
     
    990979
    991980=== Settings of type `color` ===
    992 
    993 Create a setting of type `color`. The `default` color can be any color as understood under https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Propertyvaluesexplanations:
     981Create a setting of type `color`. The `default` color can be any color as understood under [wikitr:/Help/Styles/MapCSSImplementation#Propertyvaluesexplanations Property values explanations]:
    994982{{{
    995983#!mapcss
     
    1010998
    1011999=== Grouping settings ===
    1012 
    10131000Similar settings can be grouped together by defining ''settings groups'' (since r15289):
    10141001
     
    10351022}}}
    10361023
    1037 Settings groups are displayed as sub-menus from the style settings menu. If at least two settings belong to a group, a special "Toggle all settings" menu item allows to quickly switch on/off all settings from this group at once. Usage example: wiki:/Styles/MapWithAI.
     1024Settings groups are displayed as sub-menus from the style settings menu. If at least two settings belong to a group, a special "Toggle all settings" menu item allows to quickly switch on/off all settings from this group at once. Usage example: [wikitr:/Styles/MapWithAI MapWithAI].
     1025
    10381026
    10391027== Properties ==#Properties
    1040 
    10411028=== General properties ===
    10421029
    10431030||=  '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
    1044 || {{{z-index}}} || Specify the order the objects are drawn: The objects with higher z-index are drawn on top of objects with lower z-index || ''Number'' (can be negative) ||  0  ||
    1045 || {{{major-z-index}}} || Similar to {{{z-index}}}, but it has higher priority than {{{z-index}}}. So if one object has a higher {{{major-z-index}}} than the other, it is drawn on top. If the {{{major-z-index}}} is the same, {{{z-index}}} decides. || ''Number'' (can be negative) || Depends on style element: area: 1, casing: 2, left-/right-casing: 2.1, line-pattern: 2.9, line: 3, point: 4, default-point: 4.1, line-text: 4.9, point-text: 5 ||
    1046 || {{{object-z-index}}} || Similar to {{{z-index}}}, but has lower priority. Controls the painting order for overlapping objects. E.g. for two crossing ways with text: Use {{{z-index}}} or {{{major-z-index}}} if you first want to draw the two lines and then the two captions. Use {{{object-z-index}}} if one of the ways should be completely on top of the other. || ''Number'' (can be negative) ||  0  ||
    1047 || {{{modifier}}} || Better control, whether a default line / node symbol is generated by JOSM. This happens when there is no proper style ({{{modifier=false}}}) found on any layer. || {{{false}}} or {{{true}}} || {{{false}}} for the default layer and {{{true}}} for any other layer ||
     1031|| `z-index` || Specify the order the objects are drawn: The objects with higher z-index are drawn on top of objects with lower z-index || ''Number'' (can be negative) ||  0  ||
     1032|| `major-z-index` || Similar to `z-index`, but it has higher priority than `z-index`. So if one object has a higher `major-z-index` than the other, it is drawn on top. If the `major-z-index` is the same, `z-index` decides. || ''Number'' (can be negative) || Depends on style element: area: 1, casing: 2, left-/right-casing: 2.1, line-pattern: 2.9, line: 3, point: 4, default-point: 4.1, line-text: 4.9, point-text: 5 ||
     1033|| `object-z-index` || Similar to `z-index`, but has lower priority. Controls the painting order for overlapping objects. E.g. for two crossing ways with text: Use `z-index` or `major-z-index` if you first want to draw the two lines and then the two captions. Use `object-z-index` if one of the ways should be completely on top of the other. || ''Number'' (can be negative) ||  0  ||
     1034|| `modifier` || Better control, whether a default line / node symbol is generated by JOSM. This happens when there is no proper style (`modifier=false`) found on any layer. || `false` or `true` || `false` for the default layer and `true` for any other layer ||
    10481035
    10491036Note that due to performance reasons the values for the three z-indexes are limited to 24 bit float values with max. 5 decimal digits. Currently the internal mappaint style uses values with max. 2 digits before and after the decimal separator. To avoid problems use values of z-indexes between -99.999 and +99.999. (See also #14485)
    10501037
    1051 
    10521038=== Icon and symbol styles ===
    10531039
    10541040||=  '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
    1055 || {{{icon-image}}} || The icon at node position. See also [wikitr:/Help/Styles/Images Images]. || ''Image'' ||  -  ||
    1056 || {{{icon-opacity}}} || Opacity of the icon image || ''Opacity'' ||  1.0  ||
    1057 || {{{icon-width}}} || Width of the icon. If only one of the properties {{{icon-width}}} and {{{icon-height}}} is given, the image will be scaled proportionally. The icon will keep the original size, if neither {{{icon-width}}} nor {{{icon-height}}} is set. || ''Number'' ||  -  ||
    1058 || {{{icon-height}}} || Height of the icon. (See {{{icon-width}}}) || ''Number'' ||  -  ||
     1041|| `icon-image` || The icon at node position. See also [wikitr:/Help/Styles/Images Images]. || ''Image'' ||  -  ||
     1042|| `icon-opacity` || Opacity of the icon image || ''Opacity'' ||  1.0  ||
     1043|| `icon-width` || Width of the icon. If only one of the properties `icon-width` and `icon-height` is given, the image will be scaled proportionally. The icon will keep the original size, if neither `icon-width` nor `icon-height` is set. || ''Number'' ||  -  ||
     1044|| `icon-height` || Height of the icon. (See `icon-width`) || ''Number'' ||  -  ||
    10591045|| `icon-offset-x` || Shift the icon in horizontal direction (positive values to the right) (since r8085) || ''Number'' ||  0  ||
    10601046|| `icon-offset-y` || Shift the icon in vertical direction (positive values downwards) (since r8085) || ''Number'' ||  0  ||
    1061 || `icon-rotation` || Rotate the icon clockwise or anti clockwise (negative value)(since r8260) || `[rad]`, `[rad]rad`, `[deg]°`, `[deg]deg`, `[grad]grad`, `[turn]turn` ([https://developer.mozilla.org/en/docs/Web/CSS/angle definition]) or a cardinal direction (e.g. `northeast` or `sw`); See also the functions `degree_to_radians`, `cardinal_to_radians`. ||  -  ||
    1062 || `icon-position` || Define the position of the icon for areas. Same as `text-position` (since r11730). || {{{center}}}, {{{inside}}}, {{{line}}} ||  {{{center}}}  ||
    1063 || {{{symbol-shape}}} || Display a symbol at the position of the node || {{{square}}}, {{{circle}}}, {{{triangle}}}, {{{pentagon}}}, {{{hexagon}}}, {{{heptagon}}}, {{{octagon}}}, {{{nonagon}}}, {{{decagon}}} ||  -  ||
    1064 || {{{symbol-size}}} || Size of the symbol || ''Number'', can be relative ("+4") ||  10  ||
    1065 || {{{symbol-stroke-width}}} || outline stroke width || ''Width'' || 1.0 if {{{symbol-stroke-color}}} is set ||
    1066 || {{{symbol-stroke-color}}} || line color || ''Color'' || {{{#FFC800}}} if {{{symbol-stroke-width}}} is set ||
    1067 || {{{symbol-stroke-opacity}}} || line opacity || ''Opacity'' ||  1.0  ||
    1068 || {{{symbol-fill-color}}} || fill color for the shape || ''Color'' || {{{blue}}}, unless either {{{symbol-stroke-width}}} or {{{symbol-stroke-color}}} is set ||
    1069 || {{{symbol-fill-opacity}}} || fill opacity || ''Opacity'' ||  1.0  ||
    1070 || {{{text-...}}}, {{{font-...}}} ||||||  general text & font properties  ||
    1071 || {{{text-anchor-horizontal}}} || horizontal text label placement || {{{left}}}, {{{center}}}, {{{right}}} ||  {{{right}}}  ||
    1072 || {{{text-anchor-vertical}}} || vertical text label placement || {{{above}}}, {{{top}}}, {{{center}}}, {{{bottom}}}, {{{below}}} ||  {{{bottom}}}  ||
    1073 || {{{text-rotation}}} || Rotate the text clockwise or anti clockwise (negative value)(since r16253) || `[rad]`, `[rad]rad`, `[deg]°`, `[deg]deg`, `[grad]grad`, `[turn]turn` ([https://developer.mozilla.org/en/docs/Web/CSS/angle definition]) or a cardinal direction (e.g. `northeast` or `sw`); See also the functions `degree_to_radians`, `cardinal_to_radians`. (Note that the direction means where the upper edge of the text faces. That means with the default direction of north the text flows to east (with a left to right language). So if you want to flow it to e.g. south you need to set east.) ||  -  ||
    1074 
    1075 Do not rely on the default values for {{{symbol-...}}} properties (except for {{{opacity}}}). They are intended for "quick & dirty" style sheets and should be set to an explicit value.
    1076 
    1077 
    1078 
    1079 
    1080 
    1081 === Line styles ===
     1047|| `icon-rotation` || Rotate the icon clockwise or anti clockwise (negative value)(since r8260) || `[rad]`, `[rad]rad`, `[deg]°`, `[deg]deg`, `[grad]grad`, `[turn]turn` ([https://developer.mozilla.org/en/docs/Web/CSS/angle definition]) \\ or a cardinal direction (e.g. `northeast` or `sw`); \\ or `way` to rotate the icon in the direction of the parent way. \\ See also the functions `degree_to_radians`, `cardinal_to_radians`. \\Since version 18678 function parent_way_angle() is an alternativ to way: e.g. {{{ way > node[...]::layer_x { ... icon-rotation: parent_way_angle(); ... } }}}  ||  -  ||
     1048|| `icon-position` || Define the position of the icon for areas. Same as `text-position` (since r11730). || `center`, `inside`, `line` ||  `center`  ||
     1049|| `symbol-shape` || Display a symbol at the position of the node || `square`, `circle`, `triangle`, `pentagon`, `hexagon`, `heptagon`, `octagon`, `nonagon`, `decagon` ||  -  ||
     1050|| `symbol-size` || Size of the symbol || ''Number'', can be relative ("+4") ||  10  ||
     1051|| `symbol-stroke-width` || outline stroke width || ''Width'' || 1.0 if `symbol-stroke-color` is set ||
     1052|| `symbol-stroke-color` || line color || ''Color'' || `#FFC800` if `symbol-stroke-width` is set ||
     1053|| `symbol-stroke-opacity` || line opacity || ''Opacity'' ||  1.0  ||
     1054|| `symbol-fill-color` || fill color for the shape || ''Color'' || `blue`, unless either `symbol-stroke-width` or `symbol-stroke-color` is set ||
     1055|| `symbol-fill-opacity` || fill opacity || ''Opacity'' ||  1.0  ||
     1056|| `text-...`, `font-...` ||||||  see general '''Text & Font properties''' ||
     1057
     1058Do not rely on the default values for `symbol-...` properties (except for `opacity`). They are intended for "quick & dirty" style sheets and should be set to an explicit value.
     1059
     1060=== Line styles ===#LineStyles
    10821061||=  '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
    1083 || {{{width}}} || Line width || ''Width'' ||  -  ||
    1084 || {{{color}}} || Line color || ''Color'' ||  value of {{{fill-color}}} or (if unset) JOSM's default untagged color ({{{#808080}}}) ||
    1085 || {{{opacity}}} || How transparent the line is. || ''Opacity'' ||  1.0  ||
    1086 || {{{dashes}}} || An array of alternating on/off lengths || list of numbers, e.g. [[br]]> 15, 5 [[br]][[br]]may be written as expression: [[br]] > {{{list(3, 4, 5, 6)}}} [[br]][[br]]or the keyword {{{none}}}[[br]]to turn dashes off ||  -  ||
    1087 || {{{dashes-offset}}} || shift the dash pattern by a certain amount || ''Number'' (>= 0) ||  0  ||
    1088 || {{{dashes-background-color}}} || The color to use in between the dashes (optional) || ''Color'' ||  -  ||
    1089 || {{{dashes-background-opacity}}} || Opacity value for the dashes background || ''Opacity'' ||  value of {{{opacity}}}  ||
    1090 || {{{linecap}}} || Shape at the end of the line (see [https://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty here]) || {{{none}}}, {{{round}}}, {{{square}}} ||  {{{none}}}  ||
    1091 || {{{linejoin}}} || Shape at the line corners || {{{round}}}, {{{miter}}}, {{{bevel}}} ||  {{{round}}}  ||
    1092 || {{{miterlimit}}}                                   || Applies for {{{linejoin: miter}}}. Sets the maximum overshoot when line segments meet at a very small angle || ''Number'' (>= 1.0) ||  10.0  ||
    1093 || {{{offset}}} || Move line to the left or right (when looking in way direction). This could be used to draw multiple lanes for one way or mark left and right side of a way differently. || ''Number'' (positive value moves line to the left, negative to the right) ||  0  ||
    1094 || {{{text-position}}} || set to {{{line}}}, if text should be drawn along the line || {{{line}}}, {{{center}}} ||  -  ||
    1095 || {{{text-...}}}, {{{font-...}}} ||||||  general text & font properties  ||
     1062|| `width` || Line width || ''Width'' ||  -  ||
     1063|| `color` || Line color || ''Color'' ||  value of `fill-color` or\\(if unset) JOSM's default \\untagged color (`#808080`) ||
     1064|| `opacity` || How transparent the line is. || ''Opacity'' ||  1.0  ||
     1065|| `dashes` || An array of alternating on/off lengths || list of numbers, e.g. \\> 15, 5 \\ \\may be written as expression: \\ > `list(3, 4, 5, 6)` \\ \\or the keyword `none` \\to turn dashes off ||  -  ||
     1066|| `dashes-offset` || shift the dash pattern by a certain amount || ''Number'' (>= 0) ||  0  ||
     1067|| `dashes-background-color` || The color to use in between the dashes (optional) || ''Color'' ||  -  ||
     1068|| `dashes-background-opacity` || Opacity value for the dashes background || ''Opacity'' ||  value of `opacity`  ||
     1069|| `linecap` || Shape at the end of the line (see [https://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty here]) || `none`, `round`, `square` ||  `none`  ||
     1070|| `linejoin` || Shape at the line corners || `round`, `miter`, `bevel` ||  `round`  ||
     1071|| `miterlimit` || Applies for `linejoin: miter`. \\Sets the maximum overshoot when line segments meet at a very small angle || ''Number'' (>= 1.0) ||  10.0  ||
     1072|| `offset` || Move line to the left or right (when looking in way direction). \\This could be used to draw multiple lanes for one way or mark left and right side of a way differently. || ''Number'' (positive value moves line to the left,\\negative to the right) ||  0  ||
     1073|| `text-position` || set to `line`, if text should be drawn along the line || `line`, `center` ||  -  ||
     1074|| `text-...`,\\`font-...` |||||| see general '''Text & Font properties  ||
    10961075|| `repeat-image` || repeated image along a line ''(since r5801)'' || ''Image'' ||  -  ||
    10971076|| `repeat-image-width` || Width of the image (optional, see `icon-width`) ''(since r5811)'' || ''Number'' ||  -  ||
    10981077|| `repeat-image-height` || Height of the image (optional) ''(since r5811)'' || ''Number'' ||  -  ||
    1099 || `repeat-image-align` || Alignment of the image. Top-, bottom edge or the (horizontal) center line of the image will be along the line ''(since r5801)'' || `top`, `center`, `bottom` ||  `center`  ||
     1078|| `repeat-image-align` || Alignment of the image.\\Top-, bottom edge or the (horizontal) center line of the image will be along the line ''(since r5801)'' || `top`, `center`, `bottom` ||  `center`  ||
    11001079|| `repeat-image-offset` || Offset from the line ''(since r5801)'' || ''Number'' ||  0  ||
    11011080|| `repeat-image-spacing` || Spacing between repeated images ''(since r5801)'' || ''Number'' ||  0  ||
     
    11031082|| `repeat-image-opacity` || Opacity of the repeated image ''(since r16700)'' || ''Number'' ||  1.0  ||
    11041083
    1105 All these properties (except for {{{text-...}}} and {{{font-...}}}) exist also with the {{{casing-}}} prefix. The casing is a second independent line element, that is drawn below the normal line and can be used to draw a thin frame around the line in another color.
     1084All these properties (except for `text-...` and `font-...`) exist also with the `casing-` prefix. The casing is a second independent line element, that is drawn below the normal line and can be used to draw a thin frame around the line in another color.
    11061085||=  '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
    1107 || {{{casing-width}}}               || Width of the border on both sides of the main line. In JOSM < 5214: Total width of the casing || ''Width'' (revers to {{{width}}} if relative width is specified) ||  -  ||
    1108 || {{{casing-color}}} || Casing color || ''Color'' ||  value of {{{fill-color}}} or (if unset) JOSM's default untagged color ({{{#808080}}}) ||
    1109 || {{{casing-opacity}}} || How transparent the casing is. || ''Opacity'' ||  1.0  ||
    1110 || {{{casing-}}}... || ... || ... ||  ...  ||
    1111 Similar to {{{casing-}}}, there is also the {{{left-casing-}}} and {{{right-casing-}}} prefix. It draws additional lines to the left and to the right of the main line.
    1112 
    1113 === Area styles ===
    1114 ||=  '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
    1115 || {{{fill-color}}} || Color in which to fill the area. Until 11700, the alpha component was set to 50 to create a transparency effect. || ''Color'' ||  -  ||
    1116 || {{{fill-image}}} || Image pattern || ''Image'' ||  -  ||
    1117 || {{{fill-extent}}} || Set this property, to draw only the outline of the area. The number specifies, how far to fill from the border of the area towards the center. (If unset, the area will be filled completely) ''(since r9008)'' || ''Number'' ||  -  ||
    1118 || {{{fill-extent-threshold}}} || Set this property, to draw full area when the given percentage of coverage is reached. Can be greater than 100% as the covered area is estimated as **perimeter * extent**. || ''Number'' ||  -  ||
    1119 || {{{fill-opacity}}} || How transparent the fill is; applies to both color and image || ''Opacity'' || 0.2 ''(since r11700, 1.0 before that)'' (can be changed with the {{{mappaint.fillalpha}}} and {{{mappaint.fill-image-alpha}}} preferences)  ||
    1120 || {{{text-position}}} || set to {{{center}}}, if text should be drawn in the center of the area. Set to {{{inside}}} to place the text completely inside the area. ''(since r11722)'' || {{{line}}}, {{{center}}}, {{{inside}}} ||  -  ||
    1121 || {{{text-...}}}, {{{font-...}}} ||||||  general text & font properties  ||
    1122 Required properties to create an Area style: {{{fill-color}}} or {{{fill-image}}}
    1123 
     1086|| `casing-width` || Width of the border on both sides of the main line. \\In JOSM < 5214: Total width of the casing || ''Width'' (revers to `width` if relative width is specified) ||  -  ||
     1087|| `casing-color` || Casing color || ''Color'' ||  value of `fill-color` or (if unset) \\JOSM's default untagged color (`#808080`) ||
     1088|| `casing-opacity` || How transparent the casing is. || ''Opacity'' ||  1.0  ||
     1089|| `casing-`... || ... || ... ||  ...  ||
     1090Similar to `casing-`, there is also the `left-casing-` and `right-casing-` prefix. It draws additional lines to the left and to the right of the main line.
     1091
     1092=== Area styles ===#AreaStyles
     1093||= '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
     1094|| `fill-color` || Color in which to fill the area. Until 11700, the alpha component was set to 50 to create a transparency effect. || ''Color'' ||  -  ||
     1095|| `fill-image` || Image pattern || ''Image'' ||  -  ||
     1096|| `fill-extent` || Set this property, to draw only the outline of the area. The number specifies, how far to fill from the border of the area towards the center. (If unset, the area will be filled completely) ''(since r9008)'' || ''Number'' ||  -  ||
     1097|| `fill-extent-threshold` || Set this property, to draw full area when the given percentage of coverage is reached. Can be greater than 100% as the covered area is estimated as **perimeter * extent**. || ''Number'' ||  -  ||
     1098|| `fill-opacity` || How transparent the fill is; applies to both color and image || ''Opacity'' || 0.2 ''(since r11700, 1.0 before that)'' \\(can be changed with the `mappaint.fillalpha` and \\`mappaint.fill-image-alpha` preferences)  ||
     1099|| `text-position` || set to `center`, if text should be drawn in the center of the area. Set to `inside` to place the text completely inside the area. ''(since r11722)'' || `line`, `center`, `inside` ||  -  ||
     1100|| `text-...`, `font-...` ||||||  see general text & font properties  ||
     1101Required properties to create an Area style: `fill-color` or `fill-image`
    11241102
    11251103=== Text & Font properties ===
     
    11381116|-------------------------------------------------------------------------------
    11391117{{{#!td align=left  valign=top
    1140 {{{text}}}  
     1118`text` 
    11411119}}}
    11421120{{{#!td align=left  valign=top
    1143 How to find the label text. No label is displayed, unless this instruction is present.
     1121How to find the label text.\\No label is displayed, unless this instruction is present.
    11441122}}}
    11451123{{{#!td align=left  valign=top
    1146 {{{auto}}}
    1147    Derive the text automatically. The default name tags are: "{{{name:}}}"+''<LANG>'', "{{{name}}}", "{{{int_name}}}", "{{{ref}}}", "{{{operator}}}", "{{{brand}}}" and "{{{addr:housenumber}}}".
    1148 
    1149    Configure a list of tag names in the preference "{{{mappaint.nameOrder}}}" in order to change this list. (After changing the list, a restart of JOSM is required.)
     1124`auto`
     1125  Derive the text automatically. The default name tags are: "`name:`"+''<LANG>'', \\"`name`", "`int_name`", "`ref`", "`operator`", "`brand`" and "`addr:housenumber`".
     1126
     1127  Configure a list of tag names in the preference "`mappaint.nameOrder`" in order \\ to change this list. (After changing the list, a restart of JOSM is required.)
    11501128
    11511129''String''
    1152    Denotes the key of the tag whose value is used as text.
     1130  Denotes the key of the tag whose value is used as text.
    11531131
    11541132''Expressions''
    11551133  You can enter an expression to compute the text to be displayed. Examples:
    1156   * {{{eval("this is a static text")}}} - renderes a static text
    1157   * {{{eval(concat(tag("first"), "-", tag("second")))}}} - displays the concatenated tags "first" and "second"
    1158 
    1159 {{{""}}}
     1134  * `eval("this is a static text")` - renderes a static text
     1135  * `eval(concat(tag("first"), "-", tag("second")))` - displays \\ the concatenated tags "first" and "second"
     1136
     1137`""`
    11601138   To delete a previous set text.
    11611139}}}
     
    11641142}}}
    11651143|-------------------------------------------------------------------------------
    1166 || {{{text-color}}} || the text color || ''Color'' ||  {{{white}}} for lines and nodes, {{{#c0c0c0}}} for areas (JOSM "{{{text}}}" and "{{{areatext}}}" color preferences) ||
    1167 || {{{text-opacity}}} || how transparent the text is || ''Opacity'' ||  1.0  ||
    1168 || {{{text-offset-x}}} || shift the text horizontally, (not supported for text along line) || ''Number'' ||  0  ||
    1169 || {{{text-offset-y}}} (can also be written as {{{text-offset}}})  || shift the text vertically, positive values shift the text in upwards direction  || ''Number'' ||  0  ||
    1170 || {{{text-halo-radius}}} || size of text background border (to make text visible on background with a similar color) || ''Number'' ||  -  ||
    1171 || {{{text-halo-color}}} || color of the text halo || ''Color'' ||  complement of the text color  ||
    1172 || {{{text-halo-opacity}}} || transparency for the text halo || ''Opacity'' ||  1.0  ||
    1173 || {{{font-family}}} || font family || ''String'' ||  "Droid Sans"[[br]](JOSM preference "mappaint.font")  ||
    1174 || {{{font-size}}} || font size || ''Number'' ||  8[[br]](JOSM preference "mappaint.fontsize")  ||
    1175 || {{{font-weight}}} || bold or not || {{{bold}}}, {{{normal}}} ||  {{{normal}}}  ||
    1176 || {{{font-style}}} || italic or not || {{{italic}}}, {{{normal}}} ||  {{{normal}}}  ||
     1144|| `text-color` || the text color || ''Color'' ||  `white` for lines and nodes,\\`#c0c0c0` for areas \\(JOSM "`text`" and "`areatext`"\\color preferences) ||
     1145|| `text-opacity` || how transparent the text is || ''Opacity'' ||  1.0  ||
     1146|| `text-offset-x` || shift the text horizontally, \\(not supported for text along line) || ''Number'' ||  0  ||
     1147|| `text-offset-y`\\(can also be written as\\`text-offset`)  || shift the text vertically, positive values shift the text in upwards direction  || ''Number'' ||  0  ||
     1148|| `text-halo-radius` || size of text background border \\(to make text visible on background \\with a similar color) || ''Number'' ||  -  ||
     1149|| `text-halo-color` || color of the text halo || ''Color'' ||  complement of the text color  ||
     1150|| `text-halo-opacity` || transparency for the text halo || ''Opacity'' ||  1.0  ||
     1151|| `text-anchor-horizontal` || horizontal text label placement || `left`, `center`, `right` ||  `right`  ||
     1152|| `text-anchor-vertical` || vertical text label placement || `above`, `top`, `center`, `bottom`, `below` ||  `bottom`  ||
     1153|| `text-rotation` || Rotate the text clockwise or anti clockwise (negative value)\\(since r16253) || `[rad]`, `[rad]rad`, `[deg]°`, `[deg]deg`, `[grad]grad`, `[turn]turn` \\([https://developer.mozilla.org/en/docs/Web/CSS/angle definition]) or a cardinal direction (e.g. `northeast` or `sw`); \\ or `way` to rotate the text in the direction of the parent way. \\See also the functions `degree_to_radians`, `cardinal_to_radians`. \\Since version 18678 function parent_way_angle() is an alternativ to way: e.g. {{{ way > node[...]::layer_x { ... text-rotation: parent_way_angle(); ... } }}} \\(Note that the direction means where the upper edge of the text faces.\\That means with the default direction of north the text flows to east\\(with a left to right language). \\So if you want to flow it to e.g. south you need to set east.) ||  -  ||
     1154|| `text-position` |||||| see [#AreaStyles Area styles] and [#LineStyles Line styles] ||
     1155|| `font-family` || font family || ''String'' ||  "Droid Sans" \\(JOSM preference "`mappaint.font`")  ||
     1156|| `font-size` || font size || ''Number'' ||  8 \\(JOSM preference "`mappaint.fontsize`")  ||
     1157|| `font-weight` || bold or not || `bold`, `normal` ||  `normal`  ||
     1158|| `font-style` || italic or not || `italic`, `normal` ||  `normal`  ||
    11771159
    11781160=== User defined properties ===
     
    11801162* In [wikitr:/Rules Validator rules] they must be prefixed by a `-`, e.g.: `-osmoseItemClassLevel: "1210/1/1";`
    11811163
    1182 === Property values explanations ===
     1164=== Property values explanations === #Propertyvaluesexplanations
    11831165'' '''Width''' ''
    11841166 - 14.0 (any positive number)
    1185  - {{{default}}} (use JOSM's default line width, which is 2, but can be configured)
    1186  - {{{thinnest}}} (draws the line as thin as possible)
    1187  - +3 (with plus sign in front) adds the amount to the width on the default layer. This applies only for styles that are not on the default layer, e.g. highlights. Another way to write this would be {{{prop("width","default")+3}}}. For {{{casing-width}}}, this refers to the {{{width}}} value on the same layer.
     1167 - `default` (use JOSM's default line width, which is 2, but can be configured)
     1168 - `thinnest` (draws the line as thin as possible)
     1169 - +3 (with plus sign in front) adds the amount to the width on the default layer. This applies only for styles that are not on the default layer, e.g. highlights. Another way to write this would be `prop("width","default")+3`. For `casing-width`, this refers to the `width` value on the same layer.
    11881170
    11891171'' '''Image''' ''
     
    11921174'' '''Color''' ''
    11931175 * named color as found in [https://www.w3.org/TR/css3-color/#svg-color this] list
    1194  * html style: '''{{{#RRGGBB}}}''', '''{{{#RGB}}}''', '''{{{#RRGGBBAA}}}'''
    1195  * '''{{{rgb(/*r*/, /*g*/, /*b*/)}}}''' - rgb value with arguments from 0.0 to 1.0
    1196  * '''{{{rgba(/*r*/, /*g*/, /*b*/, /*alpha*/)}}}''' - rgb value with alpha
    1197  * '''{{{hsb_color(/*hue*/, /*saturation*/, /*brightness*/)}}}''' - color from HSB color space
     1176 * html style: '''`#RRGGBB`''', '''`#RGB`''', '''`#RRGGBBAA`'''
     1177 * '''`rgb(/*r*/, /*g*/, /*b*/)`''' - rgb value with arguments from 0.0 to 1.0
     1178 * '''`rgba(/*r*/, /*g*/, /*b*/, /*alpha*/)`''' - rgb value with alpha
     1179 * '''`hsb_color(/*hue*/, /*saturation*/, /*brightness*/)`''' - color from HSB color space
     1180 * if the color is prefixed with a name and #, e.g. `color: highway_track#6e541c;` it will appear in the [wikitr:/Help/Preferences/ColorPreference Color Preference] and end users can adjust the color there themself
    11981181
    11991182'' '''Opacity''' ''
     
    12011184
    12021185'' '''String''' ''
    1203  * any character sequence, in quotes, e.g. {{{"images/fill.png"}}}. If the string is an identifier, quotes are optional. (Quote and backslash sign can be escaped.)
     1186 * any character sequence, in quotes, e.g. `"images/fill.png"`. If the string is an identifier, quotes are optional. (Quote and backslash sign can be escaped.)
    12041187
    12051188'' '''Number''' ''
     
    12071190 * has a special meaning if you put a "+" sign in front (relative width)
    12081191
    1209 == Eval expressions ==
    1210 
    1211 
     1192
     1193== Eval expressions ==#Evalexpressions
    12121194See [/doc/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.html#method_summary Javadoc of Functions] for the up-to-date list of functions supported by JOSM's MapCSS implementation.
    12131195
     
    12191201  comparison operators
    12201202 asin, atan, atan2, ceil, cos, cosh, exp, floor, log, max, min, mod (since r17759), random, round, signum, sin, sinh, sqrt, tan, tanh::
    1221   the usual meaning, [https://download.oracle.com/javase/8/docs/api/java/lang/Math.html details]
     1203  the usual meaning, [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html details]
    12221204 cond(b, fst, snd)::
    12231205 b ? fst : snd::
    12241206  if ('''b''') then '''fst''' else '''snd'''
    12251207 list(a, b, ...)::
    1226   create list of values, e.g. for the {{{dashes}}} property
     1208  create list of values, e.g. for the `dashes` property
    12271209 get(lst, n)::
    12281210  get the ''n''th element of the list ''lst'' (counting starts at 0) [''since r5699'']
     
    12301212  splits string ''str'' at occurrences of the separator string ''sep'', returns a list [''since r5699'']
    12311213 prop(''p_name'')::
    1232   value of the property ''p_name'' of the current layer, e.g. prop({{{"width"}}})
     1214  value of the property ''p_name'' of the current layer, e.g. prop(`"width"`)
    12331215 prop(''p_name'', ''layer_name'')::
    12341216  property from the layer ''layer_name''
     
    12641246  assemble the strings to one
    12651247 join(''sep'', ''str1'', ''str2'', ...)::
    1266   join strings, whith ''sep'' as separator [''since r6737'']
     1248  join strings, with ''sep'' as separator [''since r6737'']
    12671249 join_list(''sep'', ''list_name'')::
    12681250   joins the elements of the list ''list_name'' to one string separated by the separator ''sep'' [''since r8775'']
     
    12921274  return the substring of ''str'', starting at index ''idx'' (0-indexed) [''since r6534'']
    12931275 substring(str, start, end)::
    1294   return the substring of ''str'', starting at index ''start'' (inclusive) up to ''end'' (exclusive) (0-indexed) [''since r6534'']
     1276  return the substring of ''str'', starting at index ''start'' (inclusive) up to ''end'' (exclusive) (0-indexed) [''since r6534''], a negative end index counts from the string end [''since r19259'']
    12951277 replace(string, old, new)::
    12961278   Replaces any occurrence of the substring ''old'' within the string ''string'' with the text ''new''
     
    13141296  [https://en.wikipedia.org/wiki/Percent-encoding percent-decode] a string. [''since r11756'']
    13151297 XML_encode(str)::
    1316   escape special characters in xml. E.g. {{{<}}} becomes {{{&lt;}}}, other special characters: {{{>}}}, {{{"}}}, {{{'}}}, {{{&}}}, {{{\n}}}, {{{\t}}} and {{{\r}}} [''since r6809'']
     1298  escape special characters in xml. E.g. `<` becomes `&lt;`, other special characters: `>`, `"`, `'`, `&`, `\n`, `\t` and `\r` [''since r6809'']
    13171299 CRC32_checksum(''str'')::
    13181300  calculate the CRC32 checksum of a string (result is an integer from 0 to 2^32^-1) [''since r6908'']
     1301 siunit_length(''str'')::
     1302   convert length units to meter (fault tolerant, ignoring white space) [''since r19089'']
    13191303 is_right_hand_traffic()::
    13201304  Check if there is left-hand or right-hand traffic at the current location. [''since r7193'']
     
    13261310  prints a string representation of `o` to the command line, followed by a new line (for debugging) [''since r7237'']
    13271311 JOSM_pref(''key'', ''default'')::
    1328   Get value from the JOSM advanced preferences. This way you can offer certain options to the user and make the style customizable. It works with strings, numbers, colors and boolean values. [[br]][This function exists since version r3856, but with some restrictions. `JOSM_pref` always returns a string, but in version r7237 and earlier, the automatic conversion of string to boolean and color was not working. You can use the following workarounds for boolean values and color in version r7237 and earlier: `cond(JOSM_pref("myprefkey", "true")="true", "X", "O")` and `html2color(JOSM_pref("mycolor", "#FF345611"))`. These explicit conversions should be no longer necessary in version r7238 and later. Automatic conversion to a number works in any version. Furthermore, in version r16590, can be used to set color properties. So `* { set_color: JOSM_pref("pref", #000000); }` will create a color property now.]
     1312  Get value from the JOSM advanced preferences. This way you can offer certain options to the user and make the style customizable. It works with strings, numbers, colors and boolean values. \\[This function exists since version r3856, but with some restrictions. `JOSM_pref` always returns a string, but in version r7237 and earlier, the automatic conversion of string to boolean and color was not working. You can use the following workarounds for boolean values and color in version r7237 and earlier: `cond(JOSM_pref("myprefkey", "true")="true", "X", "O")` and `html2color(JOSM_pref("mycolor", "#FF345611"))`. These explicit conversions should be no longer necessary in version r7238 and later. Automatic conversion to a number works in any version. Furthermore, in version r16590, can be used to set color properties. So `* { set_color: JOSM_pref("pref", #000000); }` will create a color property now.]
    13291313 setting()::
    13301314  to use a [wikitr:/Help/Styles/MapCSSImplementation#Stylesettings style setting] [''since r7450'']
     
    13401324  returns true if the object centroid lies at given ''lat''/''lon'' coordinates, e.g. to check for nodes at "null island" `node[at(0.0,0.0)]` [''since r12514'']
    13411325 is_similar(''str1'', ''str2'')::
    1342   returns true if the two strings are similar, but not identical, i.e., have a Levenshtein distance of 1 or 2. Example: {{{way[highway][name][is_similar(tag(name), "Main Street")]}}} checks for streets with a possible typo in the name (e.g. Main Streeg). [''since r14371'']
     1326  returns true if the two strings are similar, but not identical, i.e., have a Levenshtein distance of 1 or 2. Example: `way[highway][name][is_similar(tag(name), "Main Street")]` checks for streets with a possible typo in the name (e.g. Main Streeg). [''since r14371'']
    13431327 gpx_distance()::
    13441328  returns the lowest distance between the OSM object and a GPX point [''since r14802'']
     
    13471331 sort(''str1'', ''str2'', ''str3'', ''...'')::
    13481332  sorts an array of strings [''since r15279'']
    1349  sort_list()::
     1333 sort_list(''list_name'')::
    13501334  sorts a list of strings [''since r15279'']
    13511335 tag_regex(''regex'')::
    1352   returns a list of values that match the regex [''since r15317'']
     1336  returns a list containing the values of keys that match the regex [''since r15317'']
    13531337 to_boolean(''str'')::
    13541338  returns the string argument as a boolean [''since r16110'']
     
    13671351 uniq(''str1'', ''str2'', ''str3'', ''...'')::
    13681352  returns a list of strings that only have unique values from an array of strings [''since r15323'']
    1369  uniq_list()::
    1370   returns a list of strings that only have unique values from a list of strings [''since r15353'']
     1353 uniq_list(''list_name'')::
     1354  returns a list of strings that only have unique values from a list of strings [''since r15323'']
     1355 parent_way_angle()::
     1356  returns the angle of the parent way as a double in rad [''since r18664''] (see: text-rotation or icon-rotation)
     1357 convert_primitive_to_string(''PrimitiveId'')::
     1358  returns the primitive id as a string [''since r18829'']
     1359 convert_primitives_to_string(''PrimitiveId'', ''PrimitiveId'', ''...'')::
     1360  returns a list of primitive ids converted to strings [''since r18829'']
     1361 parent_osm_primitives(''optional key'', ''optional value'')::
     1362  returns a list of primitive ids which match the key and value (if present) [''since r18829'']
    13711363
    13721364=== Examples ===
    1373 
    13741365* circle symbol for house number with size depending of the number of digits
    13751366{{{
     
    14291420}}}
    14301421
     1422* casing on inside of area
     1423{{{
     1424#!mapcss
     1425area[building]:clockwise {
     1426    right-casing-width: 10;
     1427}
     1428area[building]:anticlockwise {
     1429    left-casing-width: 10;
     1430}
     1431/* or */
     1432area[building][is_clockwise()] {
     1433    right-casing-width: 10;
     1434}
     1435area[building][is_anticlockwise()] {
     1436    left-casing-width: 10;
     1437}
     1438}}}
     1439
     1440* case insensitive selector. This matches: `Name=Main Street`, but also `naMe=MAIN STREET`
     1441{{{
     1442#!mapcss
     1443way[/(?i)^name$/ =~ /(?i)^Main Street$/] {
     1444}
     1445}}}
     1446
    14311447
    14321448== Compatibility notes ==
    14331449=== MapCSS 0.2 ===
    1434 
    14351450==== Grammar ====
    1436 
    1437  * {{{way[oneway=yes]}}} does not have any magic, you can use {{{way[oneway?]}}} instead
    1438  * no {{{@import}}}
    1439  * JOSM does not require {{{eval(...)}}} to be wrapped around expressions, but for compatibility with other MapCSS implementations you should write it out.
     1451 * `way[oneway=yes]` does not have any magic, you can use `way[oneway?]` instead
     1452 * no `@import`
     1453 * JOSM does not require `eval(...)` to be wrapped around expressions, but for compatibility with other MapCSS implementations you should write it out.
    14401454
    14411455==== Properties ====
    14421456At the moment, JOSM does ''not'' support the following properties:
    14431457 line: ::
    1444   {{{image}}}
     1458  `image`
    14451459 label: ::
    1446   {{{font-variant, text-decoration, text-transform, max-width}}}
     1460  `font-variant, text-decoration, text-transform, max-width`
    14471461 shield: ::
    14481462  not supported
    14491463
    14501464=== Halcyon (Potlatch 2) ===
    1451 
    14521465 * Text label is placed in the center of the icon. For compatibility with Halcyon put
    14531466{{{
     
    14571470 at the beginning of your style sheet.
    14581471 * standard z-index in Halcyon is 5, but it is 0 in JOSM
    1459  * '''{{{image: circle;}}}''' corresponds to '''{{{symbol-shape: circle;}}}'''
     1472 * '''`image: circle;`''' corresponds to '''`symbol-shape: circle;`'''
    14601473
    14611474=== Kothic ===
    1462 
    14631475 * Kothic has support for eval, which probably differs from JOSM's eval.
    14641476 * Kothic understands units, whereas JOSM always calculates in pixel.
    1465  * The extrusion features are not available in JOSM
     1477 * The extrusion features are not available in JOSM.
    14661478
    14671479=== Ceyx ===
    1468 
    1469  * seems to have {{{[tunnel=1]}}} instead of {{{[tunnel=yes]}}} (Halcyon) or {{{[tunnel?]}}} (JOSM)
     1480 * seems to have `[tunnel=1]` instead of `[tunnel=yes]` (Halcyon) or `[tunnel?]` (JOSM)
     1481
    14701482
    14711483== Media queries (deprecated) ==
     
    15091521}}}
    15101522{{{#!td
    1511 Only include {{{@media}}} section when the current version of JOSM is greater than or equal to the specified number.
     1523Only include `@media` section when the current version of JOSM is greater than or equal to the specified number.
    15121524}}}
    15131525|-
     
    15161528}}}
    15171529{{{#!td
    1518 Only include {{{@media}}} section when the current version of JOSM is lower than or equal to the specified number.
     1530Only include `@media` section when the current version of JOSM is lower than or equal to the specified number.
    15191531}}}
    15201532|-
     
    15231535}}}
    15241536{{{#!td
    1525 Only include {{{@media}}} section when the name of the editor / renderer matches the given string. In JOSM, the only accepted value is {{{josm}}}.
    1526 }}}
    1527 
    1528 Conditions can be combined with {{{and}}}:
     1537Only include `@media` section when the name of the editor / renderer matches the given string. In JOSM, the only accepted value is `josm`.
     1538}}}
     1539
     1540Conditions can be combined with `and`:
    15291541
    15301542{{{
     
    15561568
    15571569{{{#!comment
    1558 There is also the {{{not}}} keyword (see the linked css doc for details).
     1570There is also the `not` keyword (see the linked css doc for details).
    15591571This is implemented, but probably not very useful. Feel free to add documentation.
    15601572}}}