Changes between Version 169 and Version 170 of Help/Styles/MapCSSImplementation
- Timestamp:
- 2020-03-15T16:51:56+01:00 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Help/Styles/MapCSSImplementation
v169 v170 919 919 == Style settings == 920 920 921 [[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 MapPaint dialog. Style settings are availible since r7450. The internal style provides style settings since r7454. Note that there are plans to extend the implementation of style settings (currently there are only boolean values supported), so the mapcss syntax for style settings could change in the future (see #10435). 922 923 create a setting: 921 [[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 MapPaint dialog. The following `type` of settings are available: 922 * `boolean` (since r7450) 923 * `double` (since r15731, see #10435) 924 * `string` (since r15731, see #10435) 925 926 === Settings of type `boolean` === 927 928 Create a setting of type `boolean`: 924 929 {{{ 925 930 #!mapcss … … 930 935 } 931 936 }}} 932 use a setting: 937 938 Use a setting of type `boolean`: 933 939 {{{ 934 940 #!mapcss … … 936 942 casing-width: 2; 937 943 casing-color: white; 944 } 945 }}} 946 947 === Settings of type `double` === 948 949 Create a setting of type `double`: 950 {{{ 951 #!mapcss 952 setting::place_font_size { 953 type: double; 954 label: tr("Set place name font size..."); 955 default: 11; 956 } 957 }}} 958 959 Use a setting of type `double`: 960 {{{ 961 #!mapcss 962 node.place, way.place, area.place { 963 font-size: setting("place_font_size"); 938 964 } 939 965 }}}