Warning, /libraries/kpublictransport/autotests/data/mapcss/parser-test.mapcss is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org> 0003 * SPDX-License-Identifier: CC0-1.0 0004 */ 0005 0006 @import url("included.mapcss"); 0007 0008 // union selector 0009 area[railway=platform], 0010 relation[type=multipolygon][railway=platform] 0011 { 0012 color: #ff550022; 0013 fill-color: #80f0e0d0; 0014 } 0015 0016 // chained selector 0017 area[railway=platform] node[sign] 0018 { 0019 unsupportedproperty: todo; 0020 fill-color: #ff0000; 0021 opacity: 0.5; 0022 } 0023 0024 // condition with colon-separated keys 0025 node[building:part][building:part=elevator] 0026 { 0027 opacity: 1; 0028 color: building:color; 0029 } 0030 0031 // text properties 0032 * { 0033 text: ref; 0034 text-color: #ff00ff; 0035 } 0036 0037 // line properties 0038 line { 0039 dashes: 3,5; 0040 linecap: round; 0041 linejoin: bevel; 0042 casing-width: 1; 0043 casing-color: #444444; 0044 casing-dashes: 1,1; 0045 } 0046 0047 // zoom ranges 0048 node|z12-13 {} 0049 node|z10 {} 0050 node|z-10 {} 0051 node|z10- {} 0052 node|z12-13[name] {} 0053 node|z14-[name] {} 0054 0055 // font properties 0056 * { 0057 font-family: Arial; 0058 font-size: 16; 0059 font-weight: bold; 0060 font-style: italic; 0061 text-decoration: underline; 0062 } 0063 0064 // numeric comparison conditions 0065 * [layer>1], 0066 * [layer<2], 0067 * [layer>=3], 0068 * [layer<=4] {} 0069 0070 // object types as tag or propery values 0071 area[indoor=area] { 0072 text-position: line; 0073 } 0074 0075 // units 0076 * { 0077 font-size: 16pt; 0078 width: 42px; 0079 casing-width: 2m; 0080 } 0081 0082 // numbers 0083 * { 0084 width: -10.42; 0085 } 0086 0087 // colors 0088 * { 0089 text-color: #aabbcc; 0090 fill-color: #80ccbbaa; 0091 casing-color: #123; 0092 shield-color: rgb(1.0, 0.5, 0.25); 0093 shield-casing-color: rgba(0.75, 1.0, 0.25, 0.5); 0094 color: "red"; 0095 } 0096 0097 // key not set condition 0098 area [!shop] { 0099 opacity: 0.0; 0100 } 0101 0102 // set tag 0103 node[shop=bakery] { 0104 set mx:important; 0105 } 0106 0107 // set tag to a specific value 0108 area[shop=bakery] { 0109 set mx:importance = "high"; 0110 set mx:importance = 20; 0111 } 0112 0113 // set class 0114 node[shop=bakery], 0115 node[shop=pastry] 0116 { 0117 set .importantShops; 0118 } 0119 0120 // class selectors 0121 node.importantShops { color: "red"; } 0122 way.importantShops|z20- { color: "green"; } 0123 *.importantShops[access=no] { color: "blue"; }