source: josm/trunk/test/data/renderer/node-text/style.mapcss@ 11693

Last change on this file since 11693 was 11693, checked in by michael2402, 7 years ago

Add new MapCSS reference test for way dashes/color and node texts.

File size: 2.1 KB
Line 
1canvas {
2 default-points: false;
3 default-lines: false;
4}
5
6node[test] {
7 symbol-shape: circle;
8 symbol-size: 5;
9 symbol-fill-color: #8888ff;
10 text-color: red;
11 _match: regexp_match("n(.+)", tag("test"));
12 text: eval(concat("Test ", get(prop("_match"),1)));
13}
14
15/* Anchor position */
16node[test=n1] {
17 text-anchor-horizontal: center;
18 text-anchor-vertical: center;
19}
20
21node[test=n2] {
22 text-anchor-horizontal: left;
23 text-anchor-vertical: center;
24 text-color: green;
25}
26
27node[test=n3] {
28 text-anchor-horizontal: right;
29 text-anchor-vertical: center;
30 text-color: rgba(0.1, 1.0, 0.1, 0.5);
31}
32
33node[test=n4] {
34 text-anchor-horizontal: center;
35 text-anchor-vertical: top;
36 text-color: rgba(0.1, 1.0, 0.1, 1.0);
37 text-opacity: 0.5;
38}
39
40node[test=n5] {
41 text-anchor-horizontal: center;
42 text-anchor-vertical: bottom;
43 text-color: rgba(0.1, 1.0, 0.1, 0.8);
44 text-opacity: 0.8;
45}
46
47node[test=n6] {
48 text-anchor-horizontal: center;
49 text-anchor-vertical: above;
50}
51
52node[test=n7] {
53 text-anchor-horizontal: center;
54 text-anchor-vertical: below;
55}
56
57node[test=n8] {
58 text-anchor-horizontal: center;
59 text-anchor-vertical: below;
60 text-offset-x: -10;
61 text-offset-y: -10;
62}
63
64node[test=n9] {
65 text-anchor-horizontal: left;
66 text-anchor-vertical: top;
67 text-offset-x: 5;
68 text-offset: 10; /* interpreted as offset-y */
69}
70
71node[test=n10] {
72 text-offset: list(2, -6);
73}
74
75/* Halo */
76
77node[test=n11] {
78 text-halo-radius: 1;
79 text-halo-color: green;
80}
81
82node[test=n12] {
83 text-halo-radius: 5;
84 text-halo-opacity: 0.5;
85}
86
87node[test=n13] {
88 text-halo-radius: 5;
89 text-halo-color: rgba(0, 0, 1.0, 0.4);
90}
91
92node[test=n14] {
93 text-halo-radius: 5;
94 text-halo-color: rgba(0, 0, 1.0, 0.4);
95 text-halo-opacity: 0.5;
96}
97
98node[test=n15] {
99 /* ignored */
100 text-halo-radius: -2;
101}
102
103/* Text style */
104
105node[test=n16] {
106 font-size: 10;
107 font-style: italic;
108}
109
110node[test=n17] {
111 font-size: 5;
112 text-color: green;
113}
114
115node[test=n18] {
116 font-size: 12;
117 font-weight: bold;
118}
119
120/* 19, 20: hover/disabled */
121
122/* Text values */
123node[test=n21] {
124 text: test;
125}
126
127node[test=n22] {
128 text: unused_key;
129}
130
131node[test=n23] {
132 text: auto;
133}
134
135node[test=n24] {
136 text: auto;
137}
138
139node[test=n25] {
140 text: auto;
141}
Note: See TracBrowser for help on using the repository browser.