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


Ignore:
Timestamp:
2021-11-07T09:39:25+01:00 (4 years ago)
Author:
leni
Comment:

added target #Linkselector, #PseudoClasses, line break; modified to `,

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v196 v197  
    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
    910
    1011== General Structure ==
     
    3839}}}
    3940
     41
    4042== 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''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.
     44
     45Selectors 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.
    4646
    4747Some basic examples:
     
    8282|-------------------------------------------------------------------------------
    8383{{{#!td align=center  valign=top
    84 {{{node}}}, {{{way}}}, {{{relation}}}
     84`node`, `way`, `relation`
    8585}}}
    8686{{{#!td align=left  valign=top   
     
    8989|-------------------------------------------------------------------------------
    9090{{{#!td align=center  valign=top
    91 {{{area}}}
     91`area`
    9292}}}
    9393{{{#!td align=left  valign=top   
     
    9999way[natural=beach], relation[type=multipolygon][natural=beach] {...}
    100100}}}
    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.
    102 }}}
    103 |-------------------------------------------------------------------------------
    104 {{{#!td align=center  valign=top
    105 {{{meta}}}
    106 }}}
    107 {{{#!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.
     101Note 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.
     102}}}
     103|-------------------------------------------------------------------------------
     104{{{#!td align=center  valign=top
     105`meta`
     106}}}
     107{{{#!td align=left  valign=top   
     108The `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.
    109109{{{
    110110#!mapcss
     
    122122|-------------------------------------------------------------------------------
    123123{{{#!td align=center  valign=top
    124 {{{canvas}}}
     124`canvas`
    125125}}}
    126126{{{#!td align=left  valign=top   
     
    148148|-
    149149{{{#!td align=center
    150 {{{fill-color}}}
     150`fill-color`
    151151}}}
    152152{{{#!td
     
    157157}}}
    158158{{{#!td align=center
    159 {{{black}}}
     159`black`
    160160}}}
    161161|-
    162162{{{#!td align=center
    163 {{{default-points}}}
     163`default-points`
    164164}}}
    165165{{{#!td
     
    170170}}}
    171171{{{#!td align=center
    172 {{{true}}}
     172`true`
    173173}}}
    174174|-
    175175{{{#!td align=center
    176 {{{default-lines}}}
     176`default-lines`
    177177}}}
    178178{{{#!td
     
    183183}}}
    184184{{{#!td align=center
    185 {{{true}}}
     185`true`
    186186}}}
    187187}}}
     
    206206* The functions ''prop()'' and ''is_prop_set()'' are only supported on the right side of the > sign.
    207207* 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 
     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|Link selector]] may be specified in this case.
    210209
    211210=== Parent selector ===
     
    226225
    227226=== 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.
     227Selectors 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.
    230228
    231229An '''attribute condition''' specifies a condition on a tag of an OSM object.
     
    288286|-------------------------------------------------------------------------------
    289287{{{#!td align=center  valign=top
    290 {{{^=}}}
     288`^=`
    291289}}}
    292290{{{#!td align=left  valign=top   
     
    568566
    569567=== 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.
     568You 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.
    572569
    573570{{{
     
    586583}}}
    587584
    588 === Link selector ===
     585=== Link selector === #Linkselector
    589586In a child selector, you can formulate conditions on the link between a parent and a child object.
    590587
     
    611608}}}
    612609{{{#!td align=left  valign=top   
    613 Exact match of the role name. The name name {{{role}}} is compulsory in this context.
     610Exact match of the role name. The name `role` is compulsory in this context.
    614611}}}
    615612{{{#!td align=left  valign=top   
     
    621618}}}
    622619
    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.
     620The operators `!=`, `^=`, `$=`, `*=` and `~=` are supported too. Please refer to [#condition_selector_operators condition selector operators].
     621
     622Nodes 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.
    627623
    628624{{{
     
    642638}}}
    643639
    644 
    645640=== 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.
     641You 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.
    648642
    649643{{{#!th align=center valign=top
     
    654648}}}
    655649|-------------------------------------------------------------------------------
    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 ||
     650|| `way|z12 {...} ` || At zoom level 12 ||
     651|| `way|z13-15 {...} ` || From 13 to 15 ||
     652|| `way|z16- {...} ` || 16 and above ||
     653|| `way|z-12 {...} ` || 12 and below ||
     654|| `way {...} ` || any zoom level ||
    661655
    662656The 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''.
    663657
    664 
    665 === Pseudo Classes ===
     658=== Pseudo Classes === #PseudoClasses
    666659See [/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.
    667660
    668661||= 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.
     662|| `:closed` || true for ways where the first node is the same as the last and for any (completely downloaded) multipolygon relation ||
     663|| `:closed2` || same as above, but this one ignores if a multipolygon is downloaded completely (since r9099) ||
     664|| `:completely_downloaded` || true for a relation whose members are all downloaded (since r9099) ||
     665|| `:new` || all new objects ||
     666|| `:connection` || true for nodes that are used by more than one way ||
     667|| `:unconnected` || true for nodes that are not used by any way (since r6687) ||
     668|| `: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)
     669|| `: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 ||
     670|| `:clockwise` || Whether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order. ||
     671|| `:anticlockwise` || Whether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order. ||
     672|| `:unclosed_multipolygon` || true for fully loaded unclosed multipolygon relations (since r8252) ||
     673|| `:open_end` || to select end nodes of unclosed multipolygon relations with `relation:unclosed_multipolygon >:open_end node` (since r8252) ||
     674|| `:in-downloaded-area` || true if an object is within source area and false if in the hatched area (since r8495). ||
     675|| `:selected` || true if an object is selected in the editor (since r9341). ||
     676|| `:modified` || changed and new objects (since r7193). ||
     677You can also negate pseudo classes. E.g. `!:new` for all old objects.
    685678
    686679=== Layer Identifier ===
    687 
    688680Layers can be used to create more than one style for a single object. Here is an example:
    689681{{{
     
    713705}
    714706}}}
    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).
     707This 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).
    716708
    717709The name for the layer can be any identifier.
    718710
    719 If you omit the layer in the selector, this is the same as using {{{::default}}}.
     711If you omit the layer in the selector, this is the same as using `::default`.
    720712
    721713One more example:
     
    740732[[Image(multiple_icons_and_texts.png,link=)]]
    741733
    742 In addition, you can use the * layer to override and initialize all layers.[[br]]
     734In addition, you can use the * layer to override and initialize all layers. \\
    743735It overrides all existing subparts, so
    744736
     
    781773way::A { a; b; }
    782774}}}
    783 
    784775
    785776=== Grouping ===
     
    822813way.path { text:auto; text-color: green; text-position: line; text-offset: 5; }
    823814}}}
    824 You can also negate classes. E.g. {{{way!.path}}} for all ways, which are not part of the class ''.path''.
    825 
     815You can also negate classes. E.g. `way!.path` for all ways, which are not part of the class ''.path''.
    826816
    827817=== @supports Conditional Processing  ===
     
    875865}}}
    876866{{{#!td
    877 Only include {{{@supports}}} section when the current version of JOSM is greater than or equal to the specified number.
     867Only include `@supports` section when the current version of JOSM is greater than or equal to the specified number.
    878868}}}
    879869|-
     
    882872}}}
    883873{{{#!td
    884 Only include {{{@supports}}} section when the current version of JOSM is lower than or equal to the specified number.
     874Only include `@supports` section when the current version of JOSM is lower than or equal to the specified number.
    885875}}}
    886876|-
     
    889879}}}
    890880{{{#!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}}}:
     881Only include `@supports` section when the name of the editor / renderer matches the given string. In JOSM, the only accepted value is `josm`.
     882}}}
     883
     884Conditions can be combined with `and`:
    895885
    896886{{{
     
    901891}}}
    902892
    903 Other logical operators like {{{or}}} and {{{not}}} can also be used. Parentheses are needed if you want to combine different logical operators:
     893Other logical operators like `or` and `not` can also be used. Parentheses are needed if you want to combine different logical operators:
    904894
    905895{{{
     
    920910}}}
    921911
     912
    922913== Style settings ==
    923 
    924914[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:
    925915* `boolean` (since r7450)
     
    929919
    930920=== Settings of type `boolean` ===
    931 
    932921Create a setting of type `boolean`:
    933922{{{
     
    950939
    951940=== Settings of type `double` ===
    952 
    953941Create a setting of type `double`:
    954942{{{
     
    970958
    971959=== Settings of type `string` ===
    972 
    973960Create a setting of type `string`:
    974961{{{
     
    990977
    991978=== 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:
     979Create a setting of type `color`. The `default` color can be any color as understood under [wikitr:/Help/Styles/MapCSSImplementation#Propertyvaluesexplanations Property values explanations]:
    994980{{{
    995981#!mapcss
     
    1010996
    1011997=== Grouping settings ===
    1012 
    1013998Similar settings can be grouped together by defining ''settings groups'' (since r15289):
    1014999
     
    10351020}}}
    10361021
    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.
     1022Settings 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 MapWithAI].
     1023
    10381024
    10391025== Properties ==#Properties
    1040 
    10411026=== General properties ===
    10421027
    10431028||=  '''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 ||
     1029|| `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  ||
     1030|| `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 ||
     1031|| `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  ||
     1032|| `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 ||
    10481033
    10491034Note 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)
    10501035
    1051 
    10521036=== Icon and symbol styles ===
    10531037
    10541038||=  '''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'' ||  -  ||
     1039|| `icon-image` || The icon at node position. See also [wikitr:/Help/Styles/Images Images]. || ''Image'' ||  -  ||
     1040|| `icon-opacity` || Opacity of the icon image || ''Opacity'' ||  1.0  ||
     1041|| `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'' ||  -  ||
     1042|| `icon-height` || Height of the icon. (See `icon-width`) || ''Number'' ||  -  ||
    10591043|| `icon-offset-x` || Shift the icon in horizontal direction (positive values to the right) (since r8085) || ''Number'' ||  0  ||
    10601044|| `icon-offset-y` || Shift the icon in vertical direction (positive values downwards) (since r8085) || ''Number'' ||  0  ||
    10611045|| `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 
     1046|| `icon-position` || Define the position of the icon for areas. Same as `text-position` (since r11730). || `center`, `inside`, `line` ||  `center`  ||
     1047|| `symbol-shape` || Display a symbol at the position of the node || `square`, `circle`, `triangle`, `pentagon`, `hexagon`, `heptagon`, `octagon`, `nonagon`, `decagon` ||  -  ||
     1048|| `symbol-size` || Size of the symbol || ''Number'', can be relative ("+4") ||  10  ||
     1049|| `symbol-stroke-width` || outline stroke width || ''Width'' || 1.0 if `symbol-stroke-color` is set ||
     1050|| `symbol-stroke-color` || line color || ''Color'' || `#FFC800` if `symbol-stroke-width` is set ||
     1051|| `symbol-stroke-opacity` || line opacity || ''Opacity'' ||  1.0  ||
     1052|| `symbol-fill-color` || fill color for the shape || ''Color'' || `blue`, unless either `symbol-stroke-width` or `symbol-stroke-color` is set ||
     1053|| `symbol-fill-opacity` || fill opacity || ''Opacity'' ||  1.0  ||
     1054|| `text-...`, `font-...` ||||||  general text & font properties  ||
     1055|| `text-anchor-horizontal` || horizontal text label placement || `left`, `center`, `right` ||  `right`  ||
     1056|| `text-anchor-vertical` || vertical text label placement || `above`, `top`, `center`, `bottom`, `below` ||  `bottom`  ||
     1057|| `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.) ||  -  ||
     1058
     1059Do 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.
    10801060
    10811061=== Line styles ===
    10821062||=  '''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  ||
     1063|| `width` || Line width || ''Width'' ||  -  ||
     1064|| `color` || Line color || ''Color'' ||  value of `fill-color` or (if unset) JOSM's default untagged color (`#808080`) ||
     1065|| `opacity` || How transparent the line is. || ''Opacity'' ||  1.0  ||
     1066|| `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 ||  -  ||
     1067|| `dashes-offset` || shift the dash pattern by a certain amount || ''Number'' (>= 0) ||  0  ||
     1068|| `dashes-background-color` || The color to use in between the dashes (optional) || ''Color'' ||  -  ||
     1069|| `dashes-background-opacity` || Opacity value for the dashes background || ''Opacity'' ||  value of `opacity`  ||
     1070|| `linecap` || Shape at the end of the line (see [https://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty here]) || `none`, `round`, `square` ||  `none`  ||
     1071|| `linejoin` || Shape at the line corners || `round`, `miter`, `bevel` ||  `round`  ||
     1072|| `miterlimit` || Applies for `linejoin: miter`. Sets the maximum overshoot when line segments meet at a very small angle || ''Number'' (>= 1.0) ||  10.0  ||
     1073|| `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  ||
     1074|| `text-position` || set to `line`, if text should be drawn along the line || `line`, `center` ||  -  ||
     1075|| `text-...`, `font-...` ||||||  general text & font properties  ||
    10961076|| `repeat-image` || repeated image along a line ''(since r5801)'' || ''Image'' ||  -  ||
    10971077|| `repeat-image-width` || Width of the image (optional, see `icon-width`) ''(since r5811)'' || ''Number'' ||  -  ||
     
    11031083|| `repeat-image-opacity` || Opacity of the repeated image ''(since r16700)'' || ''Number'' ||  1.0  ||
    11041084
    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.
     1085All 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.
    11061086||=  '''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.
     1087|| `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) ||  -  ||
     1088|| `casing-color` || Casing color || ''Color'' ||  value of `fill-color` or (if unset) JOSM's default untagged color (`#808080`) ||
     1089|| `casing-opacity` || How transparent the casing is. || ''Opacity'' ||  1.0  ||
     1090|| `casing-`... || ... || ... ||  ...  ||
     1091Similar 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.
    11121092
    11131093=== Area styles ===
    11141094||=  '''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 
     1095|| `fill-color` || Color in which to fill the area. Until 11700, the alpha component was set to 50 to create a transparency effect. || ''Color'' ||  -  ||
     1096|| `fill-image` || Image pattern || ''Image'' ||  -  ||
     1097|| `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'' ||  -  ||
     1098|| `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'' ||  -  ||
     1099|| `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)  ||
     1100|| `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` ||  -  ||
     1101|| `text-...`, `font-...` ||||||  general text & font properties  ||
     1102Required properties to create an Area style: `fill-color` or `fill-image`
    11241103
    11251104=== Text & Font properties ===
     
    11381117|-------------------------------------------------------------------------------
    11391118{{{#!td align=left  valign=top
    1140 {{{text}}}  
     1119`text` 
    11411120}}}
    11421121{{{#!td align=left  valign=top
     
    11441123}}}
    11451124{{{#!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.)
     1125`auto`
     1126   Derive the text automatically. The default name tags are: "`name:`"+''<LANG>'', "`name`", "`int_name`", "`ref`", "`operator`", "`brand`" and "`addr:housenumber`".
     1127
     1128   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.)
    11501129
    11511130''String''
     
    11541133''Expressions''
    11551134  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 {{{""}}}
     1135  * `eval("this is a static text")` - renderes a static text
     1136  * `eval(concat(tag("first"), "-", tag("second")))` - displays the concatenated tags "first" and "second"
     1137
     1138`""`
    11601139   To delete a previous set text.
    11611140}}}
     
    11641143}}}
    11651144|-------------------------------------------------------------------------------
    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}}}  ||
     1145|| `text-color` || the text color || ''Color'' ||  `white` for lines and nodes, `#c0c0c0` for areas (JOSM "`text`" and "`areatext`" color preferences) ||
     1146|| `text-opacity` || how transparent the text is || ''Opacity'' ||  1.0  ||
     1147|| `text-offset-x` || shift the text horizontally, (not supported for text along line) || ''Number'' ||  0  ||
     1148|| `text-offset-y` (can also be written as `text-offset`)  || shift the text vertically, positive values shift the text in upwards direction  || ''Number'' ||  0  ||
     1149|| `text-halo-radius` || size of text background border (to make text visible on background with a similar color) || ''Number'' ||  -  ||
     1150|| `text-halo-color` || color of the text halo || ''Color'' ||  complement of the text color  ||
     1151|| `text-halo-opacity` || transparency for the text halo || ''Opacity'' ||  1.0  ||
     1152|| `font-family` || font family || ''String'' ||  "Droid Sans" \\(JOSM preference "mappaint.font")  ||
     1153|| `font-size` || font size || ''Number'' ||  8 \\(JOSM preference "mappaint.fontsize")  ||
     1154|| `font-weight` || bold or not || `bold`, `normal` ||  `normal`  ||
     1155|| `font-style` || italic or not || `italic`, `normal` ||  `normal`  ||
    11771156
    11781157=== User defined properties ===
     
    11831162'' '''Width''' ''
    11841163 - 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.
     1164 - `default` (use JOSM's default line width, which is 2, but can be configured)
     1165 - `thinnest` (draws the line as thin as possible)
     1166 - +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.
    11881167
    11891168'' '''Image''' ''
     
    11921171'' '''Color''' ''
    11931172 * 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
     1173 * html style: '''`#RRGGBB`''', '''`#RGB`''', '''`#RRGGBBAA`'''
     1174 * '''`rgb(/*r*/, /*g*/, /*b*/)`''' - rgb value with arguments from 0.0 to 1.0
     1175 * '''`rgba(/*r*/, /*g*/, /*b*/, /*alpha*/)`''' - rgb value with alpha
     1176 * '''`hsb_color(/*hue*/, /*saturation*/, /*brightness*/)`''' - color from HSB color space
    11981177
    11991178'' '''Opacity''' ''
     
    12011180
    12021181'' '''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.)
     1182 * 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.)
    12041183
    12051184'' '''Number''' ''
     
    12071186 * has a special meaning if you put a "+" sign in front (relative width)
    12081187
     1188
    12091189== Eval expressions ==
    1210 
    1211 
    12121190See [/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.
    12131191
     
    12241202  if ('''b''') then '''fst''' else '''snd'''
    12251203 list(a, b, ...)::
    1226   create list of values, e.g. for the {{{dashes}}} property
     1204  create list of values, e.g. for the `dashes` property
    12271205 get(lst, n)::
    12281206  get the ''n''th element of the list ''lst'' (counting starts at 0) [''since r5699'']
     
    12301208  splits string ''str'' at occurrences of the separator string ''sep'', returns a list [''since r5699'']
    12311209 prop(''p_name'')::
    1232   value of the property ''p_name'' of the current layer, e.g. prop({{{"width"}}})
     1210  value of the property ''p_name'' of the current layer, e.g. prop(`"width"`)
    12331211 prop(''p_name'', ''layer_name'')::
    12341212  property from the layer ''layer_name''
     
    13141292  [https://en.wikipedia.org/wiki/Percent-encoding percent-decode] a string. [''since r11756'']
    13151293 XML_encode(str)::
    1316   escape special characters in xml. E.g. {{{<}}} becomes {{{&lt;}}}, other special characters: {{{>}}}, {{{"}}}, {{{'}}}, {{{&}}}, {{{\n}}}, {{{\t}}} and {{{\r}}} [''since r6809'']
     1294  escape special characters in xml. E.g. `<` becomes `&lt;`, other special characters: `>`, `"`, `'`, `&`, `\n`, `\t` and `\r` [''since r6809'']
    13171295 CRC32_checksum(''str'')::
    13181296  calculate the CRC32 checksum of a string (result is an integer from 0 to 2^32^-1) [''since r6908'']
     
    13261304  prints a string representation of `o` to the command line, followed by a new line (for debugging) [''since r7237'']
    13271305 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.]
     1306  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.]
    13291307 setting()::
    13301308  to use a [wikitr:/Help/Styles/MapCSSImplementation#Stylesettings style setting] [''since r7450'']
     
    13401318  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'']
    13411319 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'']
     1320  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'']
    13431321 gpx_distance()::
    13441322  returns the lowest distance between the OSM object and a GPX point [''since r14802'']
     
    13711349
    13721350=== Examples ===
    1373 
    13741351* circle symbol for house number with size depending of the number of digits
    13751352{{{
     
    14321409== Compatibility notes ==
    14331410=== MapCSS 0.2 ===
    1434 
    14351411==== 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.
     1412 * `way[oneway=yes]` does not have any magic, you can use `way[oneway?]` instead
     1413 * no `@import`
     1414 * JOSM does not require `eval(...)` to be wrapped around expressions, but for compatibility with other MapCSS implementations you should write it out.
    14401415
    14411416==== Properties ====
    14421417At the moment, JOSM does ''not'' support the following properties:
    14431418 line: ::
    1444   {{{image}}}
     1419  `image`
    14451420 label: ::
    1446   {{{font-variant, text-decoration, text-transform, max-width}}}
     1421  `font-variant, text-decoration, text-transform, max-width`
    14471422 shield: ::
    14481423  not supported
    14491424
    14501425=== Halcyon (Potlatch 2) ===
    1451 
    14521426 * Text label is placed in the center of the icon. For compatibility with Halcyon put
    14531427{{{
     
    14571431 at the beginning of your style sheet.
    14581432 * standard z-index in Halcyon is 5, but it is 0 in JOSM
    1459  * '''{{{image: circle;}}}''' corresponds to '''{{{symbol-shape: circle;}}}'''
     1433 * '''`image: circle;`''' corresponds to '''`symbol-shape: circle;`'''
    14601434
    14611435=== Kothic ===
    1462 
    14631436 * Kothic has support for eval, which probably differs from JOSM's eval.
    14641437 * Kothic understands units, whereas JOSM always calculates in pixel.
    1465  * The extrusion features are not available in JOSM
     1438 * The extrusion features are not available in JOSM.
    14661439
    14671440=== Ceyx ===
    1468 
    1469  * seems to have {{{[tunnel=1]}}} instead of {{{[tunnel=yes]}}} (Halcyon) or {{{[tunnel?]}}} (JOSM)
     1441 * seems to have `[tunnel=1]` instead of `[tunnel=yes]` (Halcyon) or `[tunnel?]` (JOSM)
     1442
    14701443
    14711444== Media queries (deprecated) ==
     
    15091482}}}
    15101483{{{#!td
    1511 Only include {{{@media}}} section when the current version of JOSM is greater than or equal to the specified number.
     1484Only include `@media` section when the current version of JOSM is greater than or equal to the specified number.
    15121485}}}
    15131486|-
     
    15161489}}}
    15171490{{{#!td
    1518 Only include {{{@media}}} section when the current version of JOSM is lower than or equal to the specified number.
     1491Only include `@media` section when the current version of JOSM is lower than or equal to the specified number.
    15191492}}}
    15201493|-
     
    15231496}}}
    15241497{{{#!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}}}:
     1498Only include `@media` section when the name of the editor / renderer matches the given string. In JOSM, the only accepted value is `josm`.
     1499}}}
     1500
     1501Conditions can be combined with `and`:
    15291502
    15301503{{{
     
    15561529
    15571530{{{#!comment
    1558 There is also the {{{not}}} keyword (see the linked css doc for details).
     1531There is also the `not` keyword (see the linked css doc for details).
    15591532This is implemented, but probably not very useful. Feel free to add documentation.
    15601533}}}