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


Ignore:
Timestamp:
2020-06-11T00:29:28+02:00 (5 years ago)
Author:
taylor.smock
Comment:

Clarify JOSM_pref color usage

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v178 v179  
    12991299  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 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.]
     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, can be used to set color properties. So `* { set_color: JOSM_pref("pref", #000000); }` will create a color property now.]
    13021302 setting()::
    13031303  to use a [wikitr:/Help/Styles/MapCSSImplementation#Stylesettings style setting] [''since r7450'']