aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/css/dumbymap.css
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-09-20 17:11:23 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-09-20 17:11:23 +0800
commit16fbc41e6e1e3fa0cf6d89578d78621ba86f14c3 (patch)
treeb0ab8950420a5ac401db5816e89b1300c7f0b346 /src/css/dumbymap.css
parent97d6f953ebe410818e4a85096c6da73b08a986a1 (diff)
chore: update CSS files by stylelint
Diffstat (limited to 'src/css/dumbymap.css')
-rw-r--r--src/css/dumbymap.css130
1 files changed, 82 insertions, 48 deletions
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css
index 005a8f9..1ebe0d2 100644
--- a/src/css/dumbymap.css
+++ b/src/css/dumbymap.css
@@ -18,13 +18,15 @@
18 18
19.with-leader-line:not(:has(> *)) { 19.with-leader-line:not(:has(> *)) {
20 display: inline-block; 20 display: inline-block;
21 padding-right: 15px; 21
22 padding-left: 6px;
23 background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg=="); 22 background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg==");
24 background-size: 12px 12px;
25 background-repeat: no-repeat; 23 background-repeat: no-repeat;
26 background-position: right 2px top 2px; 24 background-position: right 2px top 2px;
25
27 color: #555; 26 color: #555;
27 padding-right: 15px;
28 padding-left: 6px;
29 background-size: 12px 12px;
28 30
29 &.geolink { 31 &.geolink {
30 background-color: rgb(248 248 129); 32 background-color: rgb(248 248 129);
@@ -36,24 +38,28 @@
36 38
37 &:hover { 39 &:hover {
38 background-image: none; 40 background-image: none;
41
39 font-weight: bolder; 42 font-weight: bolder;
40 text-decoration: none; 43 text-decoration: none;
41 } 44 }
42} 45}
43 46
44*:has(> nav) { 47*:has(> nav) {
45 position: absolute;
46 right: 10px;
47 bottom: 10px;
48 48
49 /* FIXME Hide nav at proper time */ 49 /* FIXME Hide nav at proper time */
50 display: none; 50 display: none;
51 padding: 0.5rem; 51 padding: 0.5rem;
52 min-width: 120px; 52
53 position: absolute;
54 right: 10px;
55 bottom: 10px;
56 z-index: 500;
57
53 border: 2px solid gray; 58 border: 2px solid gray;
54 border-radius: 0.5rem; 59 border-radius: 0.5rem;
60
55 background-color: white; 61 background-color: white;
56 z-index: 500; 62 min-width: 120px;
57 63
58 &:has(> nav:empty) { 64 &:has(> nav:empty) {
59 display: none; 65 display: none;
@@ -66,34 +72,38 @@
66} 72}
67 73
68.dumby-block { 74.dumby-block {
69 border-left: #f0f0f0 0.5em solid;
70 padding-left: 0.5em;
71 margin-left: -0.5em; 75 margin-left: -0.5em;
76 padding-left: 0.5em;
77
78 border-left: #f0f0f0 0.5em solid;
72 margin-bottom: 3rem; 79 margin-bottom: 3rem;
73} 80}
74 81
75.DumbyMap { 82.DumbyMap {
76 position: relative; 83 display: flex;
77 max-width: 60em;
78 margin: 0 auto; 84 margin: 0 auto;
79 padding: 0; 85 padding: 0;
80 display: flex; 86
87 position: relative;
81 overflow-x: scroll; 88 overflow-x: scroll;
89 max-width: 60em;
82 90
83 /* height: 100vh; */ 91 /* height: 100vh; */
84 92
85 .Showcase { 93 .Showcase {
86 order: 2;
87 display: none; 94 display: none;
88 overflow: visible; 95 overflow: visible;
96
89 position: relative; 97 position: relative;
98 order: 2;
90 99
91 > * { 100 > * {
92 position: absolute;
93 left: 0;
94 top: 0;
95 width: 100%; 101 width: 100%;
96 height: 100%; 102 height: 100%;
103
104 position: absolute;
105 top: 0;
106 left: 0;
97 } 107 }
98 108
99 [data-focus="true"] { 109 [data-focus="true"] {
@@ -102,10 +112,10 @@
102 } 112 }
103 113
104 .SemanticHtml { 114 .SemanticHtml {
105 order: 1; 115 width: 100%;
106 padding: 1.5rem; 116 padding: 1.5rem;
107 overflow-y: scroll; 117 overflow-y: scroll;
108 width: 100%; 118 order: 1;
109 119
110 pre { 120 pre {
111 width: 100%; 121 width: 100%;
@@ -113,14 +123,17 @@
113 &:has(.map-container) { 123 &:has(.map-container) {
114 display: flex; 124 display: flex;
115 justify-content: flex-start; 125 justify-content: flex-start;
126
116 background-color: inherit; 127 background-color: inherit;
117 } 128 }
118 } 129 }
119 130
120 .map-container { 131 .map-container {
121 background: white;
122 margin: 2px; 132 margin: 2px;
133
123 border: 3px solid transparent; 134 border: 3px solid transparent;
135
136 background: white;
124 animation: fade-in 1s; 137 animation: fade-in 1s;
125 138
126 &[data-focus="true"] { 139 &[data-focus="true"] {
@@ -129,19 +142,21 @@
129 } 142 }
130 143
131 [data-placeholder] { 144 [data-placeholder] {
132 animation: fade-out 1s;
133 opacity: 0.3;
134 border: 3px solid gray; 145 border: 3px solid gray;
146
147 opacity: 0.3;
148 animation: fade-out 1s;
135 } 149 }
136 } 150 }
137} 151}
138 152
139.DumbyMap[data-layout]:not([data-layout="none"]) { 153.DumbyMap[data-layout]:not([data-layout="none"]) {
140 margin: 0 auto;
141 height: 100vh;
142 width: 100%; 154 width: 100%;
143 max-width: none; 155 height: 100vh;
156 margin: 0 auto;
157
144 border: none; 158 border: none;
159 max-width: none;
145 160
146 & ~ :not(.leader-line) { 161 & ~ :not(.leader-line) {
147 display: none; 162 display: none;
@@ -153,14 +168,16 @@
153 .SemanticHtml { 168 .SemanticHtml {
154 flex: 50%; 169 flex: 50%;
155 overflow-y: scroll; 170 overflow-y: scroll;
171
156 height: 100vh; 172 height: 100vh;
157 } 173 }
158 174
159 .Showcase { 175 .Showcase {
160 flex: 50%;
161 display: block; 176 display: block;
162 height: 100vh; 177 height: 100vh;
178
163 z-index: -1; 179 z-index: -1;
180 flex: 50%;
164 } 181 }
165} 182}
166 183
@@ -168,13 +185,14 @@
168 .SemanticHtml, 185 .SemanticHtml,
169 .Showcase { 186 .Showcase {
170 display: block; 187 display: block;
188 width: 100%;
189 height: 100%;
190 margin: 0;
191 padding: 0;
192
171 position: absolute; 193 position: absolute;
172 left: 0;
173 top: 0; 194 top: 0;
174 padding: 0; 195 left: 0;
175 margin: 0;
176 height: 100%;
177 width: 100%;
178 } 196 }
179 197
180 .Showcase { 198 .Showcase {
@@ -183,47 +201,60 @@
183 201
184 .SemanticHtml { 202 .SemanticHtml {
185 pointer-events: none; 203 pointer-events: none;
204
186 z-index: 1; 205 z-index: 1;
187 } 206 }
188} 207}
189 208
190.draggable-block { 209.draggable-block {
191 background-color: white; 210 overflow: clip;
192 font-size: 12px;
193 pointer-events: auto;
194 box-sizing: content-box; 211 box-sizing: content-box;
195 position: absolute;
196 width: fit-content; 212 width: fit-content;
213
214 position: absolute;
215
197 border: solid gray; 216 border: solid gray;
198 border-radius: 0.5rem; 217 border-radius: 0.5rem;
199 overflow: clip; 218
219 background-color: white;
220
221 font-size: 12px;
222 pointer-events: auto;
200 223
201 .dumby-block { 224 .dumby-block {
225 overflow: scroll;
226 margin: 0;
227
228 position: relative;
229
202 border: none; 230 border: none;
203 resize: both; 231 resize: both;
204 padding-inline: 1em; 232 min-width: 5rem;
205 margin: 0;
206 overflow: scroll;
207 max-height: 50vh;
208 max-width: 25vw; 233 max-width: 25vw;
209 position: relative; 234 min-height: 5rem;
235 max-height: 50vh;
236 padding-inline: 1em;
210 237
211 /* allow random width/height after resize */ 238 /* allow random width/height after resize */
239
212 &[style*="height"], 240 &[style*="height"],
213 &[style*="width"] { 241 &[style*="width"] {
214 max-height: unset;
215 max-width: unset; 242 max-width: unset;
243 max-height: unset;
216 } 244 }
217 245
218 /* gray out top of content, make draggable part easy to be seen */ 246 /* gray out top of content, make draggable part easy to be seen */
247
219 &::before { 248 &::before {
220 display: block; 249 display: block;
250 width: 100%;
251 height: 1.5rem;
252
221 position: sticky; 253 position: sticky;
222 top: 0; 254 top: 0;
255
256 background: linear-gradient(0deg, rgb(255 255 255 / 0%), white 60%);
223 content: ''; 257 content: '';
224 width: 100%;
225 height: 1.5rem;
226 background: linear-gradient(0deg, rgb(255 255 255 / 0%), rgb(255 255 255 / 100%) 60%);
227 } 258 }
228 259
229 .map-container { 260 .map-container {
@@ -233,13 +264,14 @@
233 264
234 .draggable { 265 .draggable {
235 display: block; 266 display: block;
236 position: absolute;
237 width: 100%; 267 width: 100%;
268
269 position: absolute;
238 top: 0; 270 top: 0;
239 left: 0; 271 left: 0;
240 font-size: 1.1rem;
241 z-index: 1; 272 z-index: 1;
242 273
274 font-size: 1.1rem;
243 text-align: center; 275 text-align: center;
244 276
245 transition: all 0.3s ease-in-out; 277 transition: all 0.3s ease-in-out;
@@ -247,11 +279,13 @@
247 279
248 &:hover { 280 &:hover {
249 background: #e1e1e1; 281 background: #e1e1e1;
282
250 transform: unset; 283 transform: unset;
251 284
252 & ~ * { 285 & ~ * {
253 opacity: 0.7;
254 color: gray; 286 color: gray;
287
288 opacity: 0.7;
255 } 289 }
256 } 290 }
257 } 291 }