Warning, /frameworks/syntax-highlighting/autotests/folding/highlight.mapcss.fold is written in an unsupported language. File is not indexed.

0001 <beginfold id='1'>/*</beginfold id='1'>
0002  * SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0003  * SPDX-License-Identifier: MIT
0004  <endfold id='1'>*/</endfold id='1'>
0005 
0006 // samples taken from kosmindoormap MapCSS parser unit tests
0007 
0008 @import url("included.mapcss");
0009 
0010 // union selector
0011 area[railway=platform],
0012 relation[type=multipolygon][railway=platform]
0013 <beginfold id='2'>{</beginfold id='2'>
0014     color: #ff550022;
0015     fill-color: #80f0e0d0;
0016 <endfold id='2'>}</endfold id='2'>
0017 
0018 // chained selector
0019 area[railway=platform] node[sign]
0020 <beginfold id='2'>{</beginfold id='2'>
0021     fill-color: #ff0000;
0022     opacity: 0.5;
0023 <endfold id='2'>}</endfold id='2'>
0024 
0025 // condition with colon-separated keys
0026 node[building:part][building:part=elevator]
0027 <beginfold id='2'>{</beginfold id='2'>
0028     opacity: 1;
0029     color: building:color;
0030 <endfold id='2'>}</endfold id='2'>
0031 
0032 // text properties
0033 * <beginfold id='2'>{</beginfold id='2'>
0034     text: ref;
0035     text-color: #ff00ff;
0036 <endfold id='2'>}</endfold id='2'>
0037 
0038 // line properties
0039 line <beginfold id='2'>{</beginfold id='2'>
0040     dashes: 3,5;
0041     linecap: round;
0042     linejoin: bevel;
0043     casing-width: 1;
0044     casing-color: #444444;
0045     casing-dashes: 1,1;
0046 <endfold id='2'>}</endfold id='2'>
0047 
0048 // zoom ranges
0049 node|z12-13 <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0050 node|z10 <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0051 node|z-10 <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0052 node|z10- <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0053 node|z12-13[name] <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0054 node|z14-[name] <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0055 
0056 // numeric comparison conditions
0057 * [layer>1],
0058 * [layer<2],
0059 * [layer>=3],
0060 * [layer<=4] <beginfold id='2'>{</beginfold id='2'><endfold id='2'>}</endfold id='2'>
0061 
0062 // object types as tag or property values
0063 area[indoor=area] <beginfold id='2'>{</beginfold id='2'>
0064     text-position: line;
0065     width: width;
0066 <endfold id='2'>}</endfold id='2'>
0067 
0068 // units
0069 * <beginfold id='2'>{</beginfold id='2'>
0070     font-size: 16pt;
0071     width: 42px;
0072     casing-width: 2m;
0073 <endfold id='2'>}</endfold id='2'>
0074 
0075 // negative numbers
0076 * <beginfold id='2'>{</beginfold id='2'>
0077     width: -10.42;
0078 <endfold id='2'>}</endfold id='2'>
0079 
0080 
0081 // colors
0082 * <beginfold id='2'>{</beginfold id='2'>
0083     text-color: #aabbcc;
0084     fill-color: #80ccbbaa;
0085     casing-color: #123;
0086     shield-color: rgb(1.0, 0.5, 0.25);
0087     shield-casing-color: rgba(0.75, 1.0, 0.25, 0.5);
0088     color: "red";
0089 <endfold id='2'>}</endfold id='2'>
0090 
0091 // set tag
0092 node[shop=bakery] <beginfold id='2'>{</beginfold id='2'>
0093     set mx:important;
0094 <endfold id='2'>}</endfold id='2'>
0095 
0096 // set tag to a specific value
0097 area[shop=bakery] <beginfold id='2'>{</beginfold id='2'>
0098     set mx:importance = "high";
0099     set mx:importance = 20;
0100 <endfold id='2'>}</endfold id='2'>
0101 
0102 // set class
0103 node[shop=bakery],
0104 node[shop=pastry]
0105 <beginfold id='2'>{</beginfold id='2'>
0106     set .importantShops;
0107 <endfold id='2'>}</endfold id='2'>
0108 
0109 // class selectors
0110 node.importantShops <beginfold id='2'>{</beginfold id='2'> color: "red"; <endfold id='2'>}</endfold id='2'>
0111 way.importantShops|z20- <beginfold id='2'>{</beginfold id='2'> color: "green"; <endfold id='2'>}</endfold id='2'>
0112 *.importantShops[access=no] <beginfold id='2'>{</beginfold id='2'> color: "blue"; <endfold id='2'>}</endfold id='2'>
0113 
0114 // layer selectors (see https://wiki.openstreetmap.org/wiki/MapCSS/0.2/Proposal_layer_selector)
0115 way[highway]::road <beginfold id='2'>{</beginfold id='2'>
0116   width: 8;
0117   color: #ffffff;
0118   casing-width: 2;
0119   casing-color: #a0a0a0;
0120 <endfold id='2'>}</endfold id='2'>
0121 way[railway=tram]::tram <beginfold id='2'>{</beginfold id='2'>
0122   width: 2;
0123   color: #303030;
0124   z-index: 1;
0125 <endfold id='2'>}</endfold id='2'>
0126 // default layer selector
0127 node::default <beginfold id='2'>{</beginfold id='2'>
0128     icon-image: "bla";
0129 <endfold id='2'>}</endfold id='2'>
0130 
0131 //quoted values in conditions
0132 line|z16-[highway=service][service="drive-through"] <beginfold id='2'>{</beginfold id='2'>
0133     set .service;
0134     width: 1.5m;
0135 <endfold id='2'>}</endfold id='2'>