Changes between Version 177 and Version 178 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2020-06-10T18:04:09+02:00 (6 years ago)
Author:
skyper
Comment:

center table titles; https; add revision links

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v177 v178  
    6666=== Type selector ===
    6767
    68 {{{#!th align=left valign=top
     68{{{#!th valign=top
    6969'''Selector'''
    7070}}}
    71 {{{#!th align=left valign=top
     71{{{#!th valign=top
    7272'''Description'''
    7373}}}
    7474|-------------------------------------------------------------------------------
    75 {{{#!td align=left  valign=top
     75{{{#!td align=center  valign=top
    7676*
    7777}}}
     
    8080}}}
    8181|-------------------------------------------------------------------------------
    82 {{{#!td align=left  valign=top
     82{{{#!td align=center  valign=top
    8383{{{node}}}, {{{way}}}, {{{relation}}}
    8484}}}
     
    8787}}}
    8888|-------------------------------------------------------------------------------
    89 {{{#!td align=left  valign=top
     89{{{#!td align=center  valign=top
    9090{{{area}}}
    9191}}}
     
    101101}}}
    102102|-------------------------------------------------------------------------------
    103 {{{#!td align=left  valign=top
     103{{{#!td align=center  valign=top
    104104{{{meta}}}
    105105}}}
     
    120120}}}
    121121|-------------------------------------------------------------------------------
    122 {{{#!td align=left  valign=top
     122{{{#!td align=center  valign=top
    123123{{{canvas}}}
    124124}}}
     
    146146}}}
    147147|-
    148 {{{#!td
     148{{{#!td align=center
    149149{{{fill-color}}}
    150150}}}
     
    152152Specifies the overall fill/background color (`background-color` is deprecated since r7110).
    153153}}}
    154 {{{#!td
     154{{{#!td align=center
    155155''Color''
    156156}}}
     
    159159}}}
    160160|-
    161 {{{#!td
     161{{{#!td align=center
    162162{{{default-points}}}
    163163}}}
     
    165165Whether default point style should be added to nodes where no style applies.
    166166}}}
    167 {{{#!td
     167{{{#!td align=center
    168168''Boolean''
    169169}}}
     
    172172}}}
    173173|-
    174 {{{#!td
     174{{{#!td align=center
    175175{{{default-lines}}}
    176176}}}
     
    178178Whether default line style should be added to ways where no style applies.
    179179}}}
    180 {{{#!td
     180{{{#!td align=center
    181181''Boolean''
    182182}}}
     
    231231
    232232[=#condition_selector_operators]
    233 {{{#!th align=left valign=top
     233{{{#!th valign=top
    234234'''Operator'''
    235235}}}
    236 {{{#!th align=left valign=top
     236{{{#!th valign=top
    237237'''Description'''
    238238}}}
    239 {{{#!th align=left valign=top
     239{{{#!th valign=top
    240240'''Example'''
    241241}}}
    242242|-------------------------------------------------------------------------------
    243 {{{#!td align=left  valign=top
     243{{{#!td align=center  valign=top
    244244`=`
    245245}}}
     
    256256}}}
    257257|-------------------------------------------------------------------------------
    258 {{{#!td align=left  valign=top
     258{{{#!td align=center  valign=top
    259259`!=`
    260260}}}
     
    271271}}}
    272272|-------------------------------------------------------------------------------
    273 {{{#!td align=left  valign=top
     273{{{#!td align=center  valign=top
    274274`<`, `>`, `<=`, `>=`
    275275}}}
     
    286286}}}
    287287|-------------------------------------------------------------------------------
    288 {{{#!td align=left  valign=top
     288{{{#!td align=center  valign=top
    289289{{{^=}}}
    290290}}}
     
    299299}}}
    300300|-------------------------------------------------------------------------------
    301 {{{#!td align=left  valign=top
     301{{{#!td align=center  valign=top
    302302`$=`
    303303}}}
     
    312312}}}
    313313|-----------------------------------------------
    314 {{{#!td align=left  valign=top
     314{{{#!td align=center  valign=top
    315315`*=`
    316316}}}
     
    325325}}}
    326326|-------------------------------------------------------------------------------
    327 {{{#!td align=left  valign=top
     327{{{#!td align=center  valign=top
    328328`~=`
    329329}}}
     
    339339}}}
    340340|-------------------------------------------------------------------------------
    341 {{{#!td align=left  valign=top
     341{{{#!td align=center  valign=top
    342342`=~`
    343343}}}
     
    360360}}}
    361361|-------------------------------------------------------------------------------
    362 {{{#!td align=left  valign=top
     362{{{#!td align=center  valign=top
    363363`!~` (since r6455)
    364364}}}
     
    374374}}}
    375375|-------------------------------------------------------------------------------
    376 {{{#!td align=left  valign=top
    377 `∈` ([http://www.fileformat.info/info/unicode/char/2208/index.htm U+2208], since r6609)
     376{{{#!td align=center  valign=top
     377`∈` ([https://www.fileformat.info/info/unicode/char/2208/index.htm U+2208], since r6609)
    378378}}}
    379379{{{#!td align=left  valign=top   
     
    394394}}}
    395395|-------------------------------------------------------------------------------
    396 {{{#!td align=left  valign=top
    397 `⊆` ([http://www.fileformat.info/info/unicode/char/2286/index.htm U+2286], since r15102)
     396{{{#!td align=center  valign=top
     397`⊆` ([https://www.fileformat.info/info/unicode/char/2286/index.htm U+2286], since r15102)
    398398}}}
    399399{{{#!td align=left  valign=top   
     
    412412}}}
    413413|-------------------------------------------------------------------------------
    414 {{{#!td align=left  valign=top
    415 `⊇` ([http://www.fileformat.info/info/unicode/char/2287/index.htm U+2287], since r15102)
     414{{{#!td align=center  valign=top
     415`⊇` ([https://www.fileformat.info/info/unicode/char/2287/index.htm U+2287], since r15102)
    416416}}}
    417417{{{#!td align=left  valign=top   
     
    430430}}}
    431431|-------------------------------------------------------------------------------
    432 {{{#!td align=left  valign=top
    433 `⊈` ([http://www.fileformat.info/info/unicode/char/2288/index.htm U+2288], since r15102)
     432{{{#!td align=center  valign=top
     433`⊈` ([https://www.fileformat.info/info/unicode/char/2288/index.htm U+2288], since r15102)
    434434}}}
    435435{{{#!td align=left  valign=top   
     
    448448}}}
    449449|-------------------------------------------------------------------------------
    450 {{{#!td align=left  valign=top
    451 `⊉` ([http://www.fileformat.info/info/unicode/char/2289/index.htm U+2289], since r15102)
     450{{{#!td align=center  valign=top
     451`⊉` ([https://www.fileformat.info/info/unicode/char/2289/index.htm U+2289], since r15102)
    452452}}}
    453453{{{#!td align=left  valign=top   
     
    466466}}}
    467467|-------------------------------------------------------------------------------
    468 {{{#!td align=left  valign=top
    469 `⧉` ([http://www.fileformat.info/info/unicode/char/29c9/index.htm U+29C9], since r6613)
     468{{{#!td align=center  valign=top
     469`⧉` ([https://www.fileformat.info/info/unicode/char/29c9/index.htm U+29C9], since r6613)
    470470}}}
    471471{{{#!td align=left  valign=top   
     
    487487In addition, you can test whether a tag is present or not:
    488488
    489 {{{#!th align=left valign=top
     489{{{#!th valign=top
    490490'''Condition'''
    491491}}}
    492 {{{#!th align=left valign=top
     492{{{#!th valign=top
    493493'''Example'''
    494494}}}
     
    539539"yes", "true", or "1". All other values are evaluated to false.
    540540
    541 {{{#!th align=left valign=top
     541{{{#!th valign=top
    542542'''Condition'''
    543543}}}
    544 {{{#!th align=left valign=top
     544{{{#!th valign=top
    545545'''Example'''
    546546}}}
     
    594594}}}
    595595
    596 {{{#!th align=left valign=top
     596{{{#!th valign=top
    597597'''Operator'''
    598598}}}
    599 {{{#!th align=left valign=top
     599{{{#!th valign=top
    600600'''Description'''
    601601}}}
    602 {{{#!th align=left valign=top
     602{{{#!th valign=top
    603603'''Example'''
    604604}}}
    605605|-------------------------------------------------------------------------------
    606 {{{#!td align=left  valign=top
     606{{{#!td align=center  valign=top
    607607`=`
    608608}}}
     
    644644at which the respective MapCSS rule is applied.
    645645
    646 {{{#!th align=left valign=top
     646{{{#!th align=center valign=top
    647647'''Example'''
    648648}}}
    649 {{{#!th align=left valign=top
     649{{{#!th align=center valign=top
    650650'''Description'''
    651651}}}
     
    663663See [/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.
    664664
     665||= Class =||= Description =||
    665666|| {{{:closed}}} || true for ways where the first node is the same as the last and for any (completely downloaded) multipolygon relation ||
    666667|| {{{:closed2}}} || same as above, but this one ignores if a multipolygon is downloaded completely (since r9099) ||
     
    780781
    781782=== Grouping ===
    782 
    783783Rules with common declaration block can be grouped into one:
    784784{{{
     
    821821You can also negate classes. E.g. {{{way!.path}}} for all ways, which are not part of the class ''.path''.
    822822
    823 == @supports rule for conditional processing [''since 8087''] ==
    824 
     823
     824== @supports rule for conditional processing [''since r8087''] ==
    825825@supports rules are used to skip a section of the style under certain conditions. Typically you want to use a feature which is introduced in a newer version of JOSM, but like to have a fall back style for users of older JOSM clients. Example:
    826826{{{
     
    907907}}}
    908908
    909 Since @supports rules are only supported in JOSM 8087 and later, you should also specify this as minimum JOSM version in the meta selector:
     909Since @supports rules are only supported in JOSM r8087 and later, you should also specify this as minimum JOSM version in the meta selector:
    910910
    911911{{{
     
    10181018
    10191019||=  '''Key''' =||= '''Description''' =||= '''Value Format''' =||= '''Default Value''' =||
    1020 || {{{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  ||
    1021 || {{{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  ||
     1020|| {{{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  ||
     1021|| {{{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 ||
    10221022|| {{{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  ||
    10231023|| {{{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 ||
     
    10361036|| `icon-offset-y` || Shift the icon in vertical direction (positive values downwards) (since r8085) || ''Number'' ||  0  ||
    10371037|| `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`. ||  -  ||
    1038 || `icon-position` || Define the position of the icon for areas. Same as `text-position` (since r11730). || {{{center}}}, {{{inside}}}, {{{line}}} || {{{center}}} ||
    1039 || {{{symbol-shape}}}                               || Display a symbol at the position of the node || {{{square}}}, {{{circle}}}, {{{triangle}}}, {{{pentagon}}}, {{{hexagon}}}, {{{heptagon}}}, {{{octagon}}}, {{{nonagon}}}, {{{decagon}}} ||  -  ||
     1038|| `icon-position` || Define the position of the icon for areas. Same as `text-position` (since r11730). || {{{center}}}, {{{inside}}}, {{{line}}} ||  {{{center}}}  ||
     1039|| {{{symbol-shape}}} || Display a symbol at the position of the node || {{{square}}}, {{{circle}}}, {{{triangle}}}, {{{pentagon}}}, {{{hexagon}}}, {{{heptagon}}}, {{{octagon}}}, {{{nonagon}}}, {{{decagon}}} ||  -  ||
    10401040|| {{{symbol-size}}} || Size of the symbol || ''Number'', can be relative ("+4") ||  10  ||
    1041 || {{{symbol-stroke-width}}} || outline stroke width || ''Width'' ||  1.0 if {{{symbol-stroke-color}}} is set  ||
     1041|| {{{symbol-stroke-width}}} || outline stroke width || ''Width'' || 1.0 if {{{symbol-stroke-color}}} is set ||
    10421042|| {{{symbol-stroke-color}}} || line color || ''Color'' || {{{#FFC800}}} if {{{symbol-stroke-width}}} is set ||
    10431043|| {{{symbol-stroke-opacity}}} || line opacity || ''Opacity'' ||  1.0  ||
    10441044|| {{{symbol-fill-color}}} || fill color for the shape || ''Color'' || {{{blue}}}, unless either {{{symbol-stroke-width}}} or {{{symbol-stroke-color}}} is set ||
    1045 || {{{symbol-fill-opacity}}} || fill opacity || ''Opacity'' || 1.0  ||
     1045|| {{{symbol-fill-opacity}}} || fill opacity || ''Opacity'' ||  1.0  ||
    10461046|| {{{text-...}}}, {{{font-...}}} ||||||  general text & font properties  ||
    10471047|| {{{text-anchor-horizontal}}} || horizontal text label placement || {{{left}}}, {{{center}}}, {{{right}}} ||  {{{right}}}  ||
    10481048|| {{{text-anchor-vertical}}} || vertical text label placement || {{{above}}}, {{{top}}}, {{{center}}}, {{{bottom}}}, {{{below}}} ||  {{{bottom}}}  ||
    1049 || {{{text-rotation}}} || Rotate the text clockwise or anti clockwise (negative value)(since 16253) || `[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.) ||  -  ||
     1049|| {{{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.) ||  -  ||
    10501050
    10511051Do 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.
     
    10701070|| {{{text-position}}} || set to {{{line}}}, if text should be drawn along the line || {{{line}}}, {{{center}}} ||  -  ||
    10711071|| {{{text-...}}}, {{{font-...}}} ||||||  general text & font properties  ||
    1072 || `repeat-image` || repeated image along a line ''[since 5801]'' || ''Image'' ||  -  ||
    1073 || `repeat-image-width` || Width of the image (optional, see `icon-width`) ''[since 5811]'' || ''Number'' ||  -  ||
    1074 || `repeat-image-height` || Height of the image (optional) ''[since 5811]'' || ''Number'' ||  -  ||
    1075 || `repeat-image-align` || Alignment of the image. Top-, bottom edge or the (horizontal) center line of the image will be along the line ''[since 5801]'' || `top`, `center`, `bottom` ||  `center`  ||
    1076 || `repeat-image-offset` || Offset from the line ''[since 5801]'' || ''Number'' ||  0  ||
    1077 || `repeat-image-spacing` || Spacing between repeated images ''[since 5801]'' || ''Number'' ||  0  ||
    1078 || `repeat-image-phase` || Initial spacing at the beginning of the line ''[since 5812]'' || ''Number'' ||  0  ||
     1072|| `repeat-image` || repeated image along a line ''(since r5801)'' || ''Image'' ||  -  ||
     1073|| `repeat-image-width` || Width of the image (optional, see `icon-width`) ''(since r5811)'' || ''Number'' ||  -  ||
     1074|| `repeat-image-height` || Height of the image (optional) ''(since r5811)'' || ''Number'' ||  -  ||
     1075|| `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`  ||
     1076|| `repeat-image-offset` || Offset from the line ''(since r5801)'' || ''Number'' ||  0  ||
     1077|| `repeat-image-spacing` || Spacing between repeated images ''(since r5801)'' || ''Number'' ||  0  ||
     1078|| `repeat-image-phase` || Initial spacing at the beginning of the line ''(since r5812)'' || ''Number'' ||  0  ||
    10791079
    10801080All 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.
     
    10901090|| {{{fill-color}}} || Color in which to fill the area. Until 11700, the alpha component was set to 50 to create a transparency effect. || ''Color'' ||  -  ||
    10911091|| {{{fill-image}}} || Image pattern || ''Image'' ||  -  ||
    1092 || {{{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 9008]'' || ''Number'' ||  -  ||
     1092|| {{{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'' ||  -  ||
    10931093|| {{{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'' ||  -  ||
    1094 || {{{fill-opacity}}} || How transparent the fill is; applies to both color and image || ''Opacity'' || 0.2 ''[since 11700, 1.0 before that]'' (can be changed with the {{{mappaint.fillalpha}}} and {{{mappaint.fill-image-alpha}}} preferences)  ||
    1095 || {{{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}}} ||  -  ||
     1094|| {{{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)  ||
     1095|| {{{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}}} ||  -  ||
    10961096|| {{{text-...}}}, {{{font-...}}} ||||||  general text & font properties  ||
    10971097Required properties to create an Area style: {{{fill-color}}} or {{{fill-image}}}
     
    10991099
    11001100=== Text & Font properties ===
    1101 {{{#!th align=left valign=top
     1101{{{#!th valign=top
    11021102'''Key'''
    11031103}}}
    1104 {{{#!th align=left valign=top
     1104{{{#!th valign=top
    11051105'''Description'''
    11061106}}}
    1107 {{{#!th align=left valign=top
     1107{{{#!th valign=top
    11081108'''Value Format'''
    11091109}}}
    1110 {{{#!th align=left valign=top
     1110{{{#!th valign=top
    11111111'''Default Value'''
    11121112}}}
     
    12011201  create list of values, e.g. for the {{{dashes}}} property
    12021202 get(lst, n)::
    1203   get the ''n''th element of the list ''lst'' (counting starts at 0) [''since 5699'']
     1203  get the ''n''th element of the list ''lst'' (counting starts at 0) [''since r5699'']
    12041204 split(sep, str)::
    1205   splits string ''str'' at occurrences of the separator string ''sep'', returns a list [''since 5699'']
     1205  splits string ''str'' at occurrences of the separator string ''sep'', returns a list [''since r5699'']
    12061206 prop(''p_name'')::
    12071207  value of the property ''p_name'' of the current layer, e.g. prop({{{"width"}}})
     
    12171217  get the value of the key ''key_name'' from the object's parent
    12181218 parent_tags(''key_name'')::
    1219   returns all parent's values for the key ''key_name'' as a list ordered by a natural ordering [''since 8775'']
     1219  returns all parent's values for the key ''key_name'' as a list ordered by a natural ordering [''since r8775'']
    12201220 has_tag_key(''key_name'')::
    12211221  true, if the object has a tag with the given key
     
    12231223  create color value (arguments from 0.0 to 1.0)
    12241224 hsb_color(''h'', ''s'', ''b'')::
    1225   create color from hue, saturation and brightness (arguments from 0.0 to 1.0) [''since 6899'']
     1225  create color from hue, saturation and brightness (arguments from 0.0 to 1.0) [''since r6899'']
    12261226 red(''clr''), green(''clr''), blue(''clr'')::
    12271227  get value of color channels in rgb color model
    12281228 alpha(''clr'')::
    1229   get the alpha value of the given color [''since 6749'']
     1229  get the alpha value of the given color [''since r6749'']
    12301230 length(''str'')::
    12311231  length of a string
     
    12331233  length of a list, i.e., counts its elements [''since 7162'']
    12341234 length(''lst'')::
    1235   length of a list [''since 5699''] – deprecated ''since 7162''
     1235  length of a list ([''since r5699''] – deprecated ''since r7162''
    12361236 any(obj1, obj2, ...)::
    1237   returns the first object which is not null (formerly coalesce, [''since 7164''])
     1237  returns the first object which is not null (formerly coalesce, [''since r7164''])
    12381238 concat(''str1'', ''str2'', ...)::
    12391239  assemble the strings to one
    12401240 join(''sep'', ''str1'', ''str2'', ...)::
    1241   join strings, whith ''sep'' as separator [''since 6737'']
     1241  join strings, whith ''sep'' as separator [''since r6737'']
    12421242 join_list(''sep'', ''list_name'')::
    1243    joins the elements of the list ''list_name'' to one string separated by the separator ''sep'' [''since 8775'']
     1243   joins the elements of the list ''list_name'' to one string separated by the separator ''sep'' [''since r8775'']
    12441244 upper(''str'')::
    1245    converts string to upper case [''since 11756'']
     1245   converts string to upper case [''since r11756'']
    12461246 lower(''str'')::
    1247    converts string to lower case [''since 11756'']
     1247   converts string to lower case [''since r11756'']
    12481248 trim(''str'')::
    1249    remove leading and trailing whitespace from string [''since 11756'']
     1249   remove leading and trailing whitespace from string [''since r11756'']
    12501250 trim_list(''list_name'')::
    1251    remove leading and trailing whitespace from a list of strings, will remove entries that are empty afterwards [''since 15591'']
     1251   remove leading and trailing whitespace from a list of strings, will remove entries that are empty afterwards [''since r15591'']
    12521252 JOSM_search("...")::
    12531253  true, if JOSM search applies to the object
    12541254 tr(str, arg0, arg1, ...)::
    1255   translate from English to the current language (only for strings in the JOSM user interface) [''since 6506'']
     1255  translate from English to the current language (only for strings in the JOSM user interface) [''since r6506'']
    12561256 regexp_test(regexp, string)::
    1257   test if ''string'' matches pattern ''regexp'' [''since 5699'']
     1257  test if ''string'' matches pattern ''regexp'' [''since r5699'']
    12581258 regexp_test(regexp, string, flags)::
    1259   test if ''string'' matches pattern ''regexp''; flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all") [''since 5699'']
     1259  test if ''string'' matches pattern ''regexp''; flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all") [''since r5699'']
    12601260 regexp_match(regexp, string)::
    1261   Tries to match ''string'' against pattern ''regexp''. Returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. ''string''). Further elements correspond to the bracketed parts of the regular expression. [''since 5701'']
     1261  Tries to match ''string'' against pattern ''regexp''. Returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. ''string''). Further elements correspond to the bracketed parts of the regular expression. [''since r5701'']
    12621262 regexp_match(regexp, string, flags)::
    1263   Tries to match ''string'' against pattern ''regexp''. Returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. ''string''). Further elements correspond to the bracketed parts of the regular expression. Flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all") [''since 5701'']
     1263  Tries to match ''string'' against pattern ''regexp''. Returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. ''string''). Further elements correspond to the bracketed parts of the regular expression. Flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all") [''since r5701'']
    12641264 substring(str, idx)::
    1265   return the substring of ''str'', starting at index ''idx'' (0-indexed) [''since 6534'']
     1265  return the substring of ''str'', starting at index ''idx'' (0-indexed) [''since r6534'']
    12661266 substring(str, start, end)::
    1267   return the substring of ''str'', starting at index ''start'' (inclusive) up to ''end'' (exclusive) (0-indexed) [''since 6534'']
     1267  return the substring of ''str'', starting at index ''start'' (inclusive) up to ''end'' (exclusive) (0-indexed) [''since r6534'']
    12681268 replace(string, old, new)::
    12691269   Replaces any occurrence of the substring ''old'' within the string ''string'' with the text ''new''
    12701270 osm_id()::
    1271   returns the OSM id of the current object [''since 5699'']
     1271  returns the OSM id of the current object [''since r5699'']
    12721272 osm_user_name()::
    1273   returns the OSM user name who last touched the current object [''since 15246'']
     1273  returns the OSM user name who last touched the current object [''since r15246'']
    12741274 osm_user_id()::
    1275   returns the OSM user id who last touched the current object [''since 15246'']
     1275  returns the OSM user id who last touched the current object [''since r15246'']
    12761276 osm_version()::
    1277   returns the OSM version number of the current object [''since 15246'']
     1277  returns the OSM version number of the current object [''since r15246'']
    12781278 osm_changeset_id()::
    1279   returns the id of the changeset the current object was last uploaded to [''since 15246'']
     1279  returns the id of the changeset the current object was last uploaded to [''since r15246'']
    12801280 osm_timestamp()::
    1281   returns the time of last modification to the current object, as timestamp [''since 15246'']
     1281  returns the time of last modification to the current object, as timestamp [''since r15246'']
    12821282 parent_osm_id()::
    1283   returns the OSM id of the object's parent (matched by child selector) [''since 13094'']
     1283  returns the OSM id of the object's parent (matched by child selector) [''since r13094'']
    12841284 URL_encode(str)::
    1285   [https://en.wikipedia.org/wiki/Percent-encoding percent-encode] a string. May be useful for data URLs [''since 6805'']
     1285  [https://en.wikipedia.org/wiki/Percent-encoding percent-encode] a string. May be useful for data URLs [''since r6805'']
    12861286 URL_decode(str)::
    1287   [https://en.wikipedia.org/wiki/Percent-encoding percent-decode] a string. [''since 11756'']
     1287  [https://en.wikipedia.org/wiki/Percent-encoding percent-decode] a string. [''since r11756'']
    12881288 XML_encode(str)::
    1289   escape special characters in xml. E.g. {{{<}}} becomes {{{&lt;}}}, other special characters: {{{>}}}, {{{"}}}, {{{'}}}, {{{&}}}, {{{\n}}}, {{{\t}}} and {{{\r}}} [''since 6809'']
     1289  escape special characters in xml. E.g. {{{<}}} becomes {{{&lt;}}}, other special characters: {{{>}}}, {{{"}}}, {{{'}}}, {{{&}}}, {{{\n}}}, {{{\t}}} and {{{\r}}} [''since r6809'']
    12901290 CRC32_checksum(''str'')::
    1291   calculate the CRC32 checksum of a string (result is an integer from 0 to 2^32^-1) [''since 6908'']
     1291  calculate the CRC32 checksum of a string (result is an integer from 0 to 2^32^-1) [''since r6908'']
    12921292 is_right_hand_traffic()::
    1293   Check if there is left-hand or right-hand traffic at the current location. [''since 7193'']
     1293  Check if there is left-hand or right-hand traffic at the current location. [''since r7193'']
    12941294 number_of_tags()::
    1295   returns the number of tags for the current OSM object [''since 7237'']
     1295  returns the number of tags for the current OSM object [''since r7237'']
    12961296 print(o)::
    1297   prints a string representation of `o` to the command line (for debugging) [''since 7237'']
     1297  prints a string representation of `o` to the command line (for debugging) [''since r7237'']
    12981298 println(o)::
    1299   prints a string representation of `o` to the command line, followed by a new line (for debugging) [''since 7237'']
     1299  prints a string representation of `o` to the command line, followed by a new line (for debugging) [''since r7237'']
    13001300 JOSM_pref(''key'', ''default'')::
    1301   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 3856, but with some restrictions. `JOSM_pref` always returns a string, but in version 7237 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 7237 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 7238 and later. Automatic conversion to a number works in any version. Furthermore, in version r16590, it returns strings that can be used to set properties that are used to set colors. So `* { set_color: JOSM_pref("pref", #000000); } *{color: prop("set_color"); }` works now.]
     1301  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, it returns strings that can be used to set properties that are used to set colors. So `* { set_color: JOSM_pref("pref", #000000); } *{color: prop("set_color"); }` works now.]
    13021302 setting()::
    1303   to use a [wikitr:/Help/Styles/MapCSSImplementation#Stylesettings style setting] [''since 7450'']
     1303  to use a [wikitr:/Help/Styles/MapCSSImplementation#Stylesettings style setting] [''since r7450'']
    13041304 degree_to_radians()::
    1305   returns a in degree given direction in radians [''since 8260'']
     1305  returns a in degree given direction in radians [''since r8260'']
    13061306 cardinal_to_radians()::
    1307   returns a cardinal direction in radians [''since 8260'']
     1307  returns a cardinal direction in radians [''since r8260'']
    13081308 waylength()::
    1309   returns the length of the way in metres [''since 8253'']
     1309  returns the length of the way in metres [''since r8253'']
    13101310 areasize()::
    1311   returns the area of a closed way in square meters [''since 8253'']
     1311  returns the area of a closed way in square meters [''since r8253'']
    13121312 at(lat,lon)::
    1313   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 12514'']
     1313  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'']
    13141314 is_similar(''str1'', ''str2'')::
    1315   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 14371'']
     1315  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'']
    13161316 gpx_distance()::
    1317   returns the lowest distance between the OSM object and a GPX point [''since 14802'']
     1317  returns the lowest distance between the OSM object and a GPX point [''since r14802'']
    13181318 count_roles()::
    1319   returns the number of primitives in a relation with the specified roles [''since 15275'']
     1319  returns the number of primitives in a relation with the specified roles [''since r15275'']
    13201320 sort(''str1'', ''str2'', ''str3'', ''...'')::
    1321   sorts an array of strings [''since 15279'']
     1321  sorts an array of strings [''since r15279'']
    13221322 sort_list()::
    1323   sorts a list of strings [''since 15279'']
     1323  sorts a list of strings [''since r15279'']
    13241324 tag_regex(''regex'')::
    1325   returns a list of values that match the regex [''since 15317'']
     1325  returns a list of values that match the regex [''since r15317'']
    13261326 to_boolean(''str'')::
    1327   returns the string argument as a boolean [''since 16110'']
     1327  returns the string argument as a boolean [''since r16110'']
    13281328 to_byte(''str'')::
    1329   returns the string argument as a byte [''since 16110'']
     1329  returns the string argument as a byte [''since r16110'']
    13301330 to_short(''str'')::
    1331   returns the string argument as a short [''since 16110'']
     1331  returns the string argument as a short [''since r16110'']
    13321332 to_int(''str'')::
    1333   returns the string argument as a int [''since 16110'']
     1333  returns the string argument as a int [''since r16110'']
    13341334 to_long(''str'')::
    1335   returns the string argument as a long [''since 16110'']
     1335  returns the string argument as a long [''since r16110'']
    13361336 to_float(''str'')::
    1337   returns the string argument as a float [''since 16110'']
     1337  returns the string argument as a float [''since r16110'']
    13381338 to_double(''str'')::
    1339   returns the string argument as a double [''since 16110'']
     1339  returns the string argument as a double [''since r16110'']
    13401340 uniq(''str1'', ''str2'', ''str3'', ''...'')::
    1341   returns a list of strings that only have unique values from an array of strings [''since 15323'']
     1341  returns a list of strings that only have unique values from an array of strings [''since r15323'']
    13421342 uniq_list()::
    1343   returns a list of strings that only have unique values from a list of strings [''since 15353'']
     1343  returns a list of strings that only have unique values from a list of strings [''since r15353'']
    13441344
    13451345=== Examples ===
     
    14421442 * seems to have {{{[tunnel=1]}}} instead of {{{[tunnel=yes]}}} (Halcyon) or {{{[tunnel?]}}} (JOSM)
    14431443
    1444 == Media queries [''since 6970'']  (deprecated) ==
     1444== Media queries [''since r6970'']  (deprecated) ==
    14451445
    14461446{{{#!td style="background-color: #faa"