diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-28 17:47:52 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-28 17:47:52 +0800 |
| commit | 933eba7dc3bdc979fefadd47388b20b8360e1d6b (patch) | |
| tree | 9b88908d88a025aaaa1d70306afde8e49fedab27 /src/css | |
| parent | 5a64dfc8bb8169e72b7c1164f18c6912e9e3576e (diff) | |
style: prettier
Diffstat (limited to 'src/css')
| -rw-r--r-- | src/css/dumbymap.css | 83 | ||||
| -rw-r--r-- | src/css/index.css | 4 | ||||
| -rw-r--r-- | src/css/style.css | 36 |
3 files changed, 78 insertions, 45 deletions
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index 5a67575..4826b5b 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css | |||
| @@ -8,12 +8,18 @@ root { | |||
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | @keyframes fade-in { | 10 | @keyframes fade-in { |
| 11 | from { opacity: 0; } | 11 | from { |
| 12 | to { opacity: 1; } | 12 | opacity: 0; |
| 13 | } | ||
| 14 | to { | ||
| 15 | opacity: 1; | ||
| 16 | } | ||
| 13 | } | 17 | } |
| 14 | 18 | ||
| 15 | @keyframes fade-out { | 19 | @keyframes fade-out { |
| 16 | from { opacity: 1; } | 20 | from { |
| 21 | opacity: 1; | ||
| 22 | } | ||
| 17 | 23 | ||
| 18 | to { | 24 | to { |
| 19 | visibility: hidden; | 25 | visibility: hidden; |
| @@ -22,13 +28,21 @@ root { | |||
| 22 | } | 28 | } |
| 23 | 29 | ||
| 24 | @keyframes map-fade-in { | 30 | @keyframes map-fade-in { |
| 25 | from { opacity: 0.3; } | 31 | from { |
| 26 | to { opacity: 1; } | 32 | opacity: 0.3; |
| 33 | } | ||
| 34 | to { | ||
| 35 | opacity: 1; | ||
| 36 | } | ||
| 27 | } | 37 | } |
| 28 | 38 | ||
| 29 | @keyframes map-fade-out { | 39 | @keyframes map-fade-out { |
| 30 | from { opacity: 1; } | 40 | from { |
| 31 | to { opacity: 0.3; } | 41 | opacity: 1; |
| 42 | } | ||
| 43 | to { | ||
| 44 | opacity: 0.3; | ||
| 45 | } | ||
| 32 | } | 46 | } |
| 33 | 47 | ||
| 34 | .mapclay { | 48 | .mapclay { |
| @@ -37,7 +51,7 @@ root { | |||
| 37 | 51 | ||
| 38 | &.focus::after { | 52 | &.focus::after { |
| 39 | content: "Map-ID: " attr(id); | 53 | content: "Map-ID: " attr(id); |
| 40 | padding: .3rem .5rem; | 54 | padding: 0.3rem 0.5rem; |
| 41 | 55 | ||
| 42 | position: absolute; | 56 | position: absolute; |
| 43 | left: 50%; | 57 | left: 50%; |
| @@ -56,7 +70,7 @@ root { | |||
| 56 | 70 | ||
| 57 | transform: translate(-50%, -50%); | 71 | transform: translate(-50%, -50%); |
| 58 | opacity: 0; | 72 | opacity: 0; |
| 59 | animation: 1.5s forwards fade-out cubic-bezier(.44,.18,.86,-0.21); | 73 | animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); |
| 60 | } | 74 | } |
| 61 | } | 75 | } |
| 62 | 76 | ||
| @@ -89,7 +103,6 @@ root { | |||
| 89 | } | 103 | } |
| 90 | 104 | ||
| 91 | *:has(> nav) { | 105 | *:has(> nav) { |
| 92 | |||
| 93 | /* FIXME Hide nav at proper time */ | 106 | /* FIXME Hide nav at proper time */ |
| 94 | display: none; | 107 | display: none; |
| 95 | padding: 0.5rem; | 108 | padding: 0.5rem; |
| @@ -131,11 +144,10 @@ root { | |||
| 131 | 144 | ||
| 132 | border-left: 0.5em solid #e0e0e0; | 145 | border-left: 0.5em solid #e0e0e0; |
| 133 | 146 | ||
| 134 | transition: border-color .5s linear; | 147 | transition: border-color 0.5s linear; |
| 135 | } | 148 | } |
| 136 | 149 | ||
| 137 | &.focus { | 150 | &.focus { |
| 138 | |||
| 139 | /* Dress up when block is focus */ | 151 | /* Dress up when block is focus */ |
| 140 | 152 | ||
| 141 | /* background: var(--block-focus-color); */ | 153 | /* background: var(--block-focus-color); */ |
| @@ -145,7 +157,7 @@ root { | |||
| 145 | 157 | ||
| 146 | &::after { | 158 | &::after { |
| 147 | content: counter(block) "/" attr(data-total); | 159 | content: counter(block) "/" attr(data-total); |
| 148 | padding: .3rem .5rem; | 160 | padding: 0.3rem 0.5rem; |
| 149 | 161 | ||
| 150 | position: absolute; | 162 | position: absolute; |
| 151 | left: 50%; | 163 | left: 50%; |
| @@ -163,7 +175,7 @@ root { | |||
| 163 | 175 | ||
| 164 | transform: translate(-50%, -50%); | 176 | transform: translate(-50%, -50%); |
| 165 | opacity: 0; | 177 | opacity: 0; |
| 166 | animation: 1.5s forwards fade-out cubic-bezier(.44,.18,.86,-0.21); | 178 | animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); |
| 167 | } | 179 | } |
| 168 | } | 180 | } |
| 169 | } | 181 | } |
| @@ -194,7 +206,7 @@ root { | |||
| 194 | } | 206 | } |
| 195 | } | 207 | } |
| 196 | 208 | ||
| 197 | :has( > .mapclay, > [data-placeholder]) { | 209 | :has(> .mapclay, > [data-placeholder]) { |
| 198 | display: flex; | 210 | display: flex; |
| 199 | gap: 0.5em; | 211 | gap: 0.5em; |
| 200 | 212 | ||
| @@ -225,7 +237,7 @@ root { | |||
| 225 | .Showcase { | 237 | .Showcase { |
| 226 | display: none; | 238 | display: none; |
| 227 | overflow: visible; | 239 | overflow: visible; |
| 228 | width: 100%; | 240 | width: 100%; |
| 229 | height: 100%; | 241 | height: 100%; |
| 230 | 242 | ||
| 231 | position: relative; | 243 | position: relative; |
| @@ -246,7 +258,7 @@ root { | |||
| 246 | 258 | ||
| 247 | &::after { | 259 | &::after { |
| 248 | content: "Layout: " attr(data-layout); | 260 | content: "Layout: " attr(data-layout); |
| 249 | padding: .3rem .5rem; | 261 | padding: 0.3rem 0.5rem; |
| 250 | 262 | ||
| 251 | position: absolute; | 263 | position: absolute; |
| 252 | left: 50%; | 264 | left: 50%; |
| @@ -272,13 +284,13 @@ root { | |||
| 272 | max-width: 60em; | 284 | max-width: 60em; |
| 273 | 285 | ||
| 274 | &::after { | 286 | &::after { |
| 275 | animation: 1.5s forwards fade-out cubic-bezier(.44,.18,.86,-0.21); | 287 | animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); |
| 276 | } | 288 | } |
| 277 | } | 289 | } |
| 278 | 290 | ||
| 279 | .Dumby[data-layout="side-by-side"] { | 291 | .Dumby[data-layout="side-by-side"] { |
| 280 | &::after { | 292 | &::after { |
| 281 | animation: 1.5s forwards fade-out cubic-bezier(.44,.18,.86,-0.21); | 293 | animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); |
| 282 | } | 294 | } |
| 283 | 295 | ||
| 284 | .SemanticHtml, | 296 | .SemanticHtml, |
| @@ -336,13 +348,12 @@ root { | |||
| 336 | transform: unset; | 348 | transform: unset; |
| 337 | } | 349 | } |
| 338 | } | 350 | } |
| 339 | |||
| 340 | } | 351 | } |
| 341 | } | 352 | } |
| 342 | 353 | ||
| 343 | .Dumby[data-layout="overlay"] { | 354 | .Dumby[data-layout="overlay"] { |
| 344 | &::after { | 355 | &::after { |
| 345 | animation: 1.5s forwards fade-out cubic-bezier(.44,.18,.86,-0.21); | 356 | animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); |
| 346 | } | 357 | } |
| 347 | 358 | ||
| 348 | .SemanticHtml, | 359 | .SemanticHtml, |
| @@ -384,7 +395,6 @@ root { | |||
| 384 | padding-inline: 1rem; | 395 | padding-inline: 1rem; |
| 385 | padding-block: 1rem; | 396 | padding-block: 1rem; |
| 386 | 397 | ||
| 387 | |||
| 388 | &:hover { | 398 | &:hover { |
| 389 | visibility: visible; | 399 | visibility: visible; |
| 390 | opacity: 1; | 400 | opacity: 1; |
| @@ -402,16 +412,16 @@ root { | |||
| 402 | } | 412 | } |
| 403 | 413 | ||
| 404 | #close { | 414 | #close { |
| 405 | cursor: pointer; | 415 | cursor: pointer; |
| 406 | } | 416 | } |
| 407 | 417 | ||
| 408 | #plus-font-size { | 418 | #plus-font-size { |
| 409 | cursor: zoom-in; | 419 | cursor: zoom-in; |
| 410 | } | 420 | } |
| 411 | 421 | ||
| 412 | #minus-font-size { | 422 | #minus-font-size { |
| 413 | cursor: zoom-out; | 423 | cursor: zoom-out; |
| 414 | } | 424 | } |
| 415 | } | 425 | } |
| 416 | 426 | ||
| 417 | .draggable-block { | 427 | .draggable-block { |
| @@ -431,7 +441,7 @@ root { | |||
| 431 | &:has(.dumby-block.focus) { | 441 | &:has(.dumby-block.focus) { |
| 432 | z-index: 9001; | 442 | z-index: 9001; |
| 433 | outline: solid #505050 1px; | 443 | outline: solid #505050 1px; |
| 434 | border-color: #505050 | 444 | border-color: #505050; |
| 435 | } | 445 | } |
| 436 | 446 | ||
| 437 | &:has(pre:only-child [data-placeholder]:only-child) { | 447 | &:has(pre:only-child [data-placeholder]:only-child) { |
| @@ -440,7 +450,7 @@ root { | |||
| 440 | 450 | ||
| 441 | /* Fade out top of contents scrolling */ | 451 | /* Fade out top of contents scrolling */ |
| 442 | &::before { | 452 | &::before { |
| 443 | content: ''; | 453 | content: ""; |
| 444 | display: block; | 454 | display: block; |
| 445 | height: 1.5rem; | 455 | height: 1.5rem; |
| 446 | 456 | ||
| @@ -504,7 +514,7 @@ root { | |||
| 504 | border-top-right-radius: 0.3rem; | 514 | border-top-right-radius: 0.3rem; |
| 505 | } | 515 | } |
| 506 | 516 | ||
| 507 | .handle { | 517 | .handle { |
| 508 | font-size: 1.1rem; | 518 | font-size: 1.1rem; |
| 509 | text-align: center; | 519 | text-align: center; |
| 510 | 520 | ||
| @@ -525,7 +535,8 @@ root { | |||
| 525 | } | 535 | } |
| 526 | } | 536 | } |
| 527 | 537 | ||
| 528 | &.drag, &:has(.draggable-part:hover) { | 538 | &.drag, |
| 539 | &:has(.draggable-part:hover) { | ||
| 529 | .handle { | 540 | .handle { |
| 530 | background: #e1e1e1; | 541 | background: #e1e1e1; |
| 531 | 542 | ||
| @@ -534,7 +545,7 @@ root { | |||
| 534 | 545 | ||
| 535 | .utils { | 546 | .utils { |
| 536 | visibility: visible; | 547 | visibility: visible; |
| 537 | animation: fade-in .5s; | 548 | animation: fade-in 0.5s; |
| 538 | } | 549 | } |
| 539 | 550 | ||
| 540 | > *:not(.draggable-part, .utils) { | 551 | > *:not(.draggable-part, .utils) { |
| @@ -550,8 +561,8 @@ root { | |||
| 550 | 561 | ||
| 551 | [data-placeholder] { | 562 | [data-placeholder] { |
| 552 | height: 50px !important; | 563 | height: 50px !important; |
| 553 | scale: .9; | 564 | scale: 0.9; |
| 554 | transition-duration: .4s; | 565 | transition-duration: 0.4s; |
| 555 | transition-timing-function: ease-out; | 566 | transition-timing-function: ease-out; |
| 556 | } | 567 | } |
| 557 | } | 568 | } |
diff --git a/src/css/index.css b/src/css/index.css index 194ca9c..a17ecce 100644 --- a/src/css/index.css +++ b/src/css/index.css | |||
| @@ -65,7 +65,7 @@ body { | |||
| 65 | padding-inline: 0; | 65 | padding-inline: 0; |
| 66 | 66 | ||
| 67 | font-family: monospace; | 67 | font-family: monospace; |
| 68 | font-size: 1.0rem; | 68 | font-size: 1rem; |
| 69 | 69 | ||
| 70 | &.focus { | 70 | &.focus { |
| 71 | border: var(--content-focus-border); | 71 | border: var(--content-focus-border); |
| @@ -158,7 +158,7 @@ body { | |||
| 158 | text-overflow: ellipsis; | 158 | text-overflow: ellipsis; |
| 159 | 159 | ||
| 160 | ::before { | 160 | ::before { |
| 161 | width: 2rem | 161 | width: 2rem; |
| 162 | } | 162 | } |
| 163 | } | 163 | } |
| 164 | } | 164 | } |
diff --git a/src/css/style.css b/src/css/style.css index 14a2e96..1d39cc0 100644 --- a/src/css/style.css +++ b/src/css/style.css | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | /* CSS Reset */ | 1 | /* CSS Reset */ |
| 2 | *, *::before, *::after { | 2 | *, |
| 3 | *::before, | ||
| 4 | *::after { | ||
| 3 | box-sizing: border-box; | 5 | box-sizing: border-box; |
| 4 | } | 6 | } |
| 5 | 7 | ||
| @@ -9,15 +11,28 @@ | |||
| 9 | line-height: calc(1em + 0.5rem); | 11 | line-height: calc(1em + 0.5rem); |
| 10 | } | 12 | } |
| 11 | 13 | ||
| 12 | img, picture, video, canvas, svg { | 14 | img, |
| 15 | picture, | ||
| 16 | video, | ||
| 17 | canvas, | ||
| 18 | svg { | ||
| 13 | display: block; | 19 | display: block; |
| 14 | } | 20 | } |
| 15 | 21 | ||
| 16 | input, button, textarea, select { | 22 | input, |
| 23 | button, | ||
| 24 | textarea, | ||
| 25 | select { | ||
| 17 | font: inherit; | 26 | font: inherit; |
| 18 | } | 27 | } |
| 19 | 28 | ||
| 20 | p, h1, h2, h3, h4, h5, h6 { | 29 | p, |
| 30 | h1, | ||
| 31 | h2, | ||
| 32 | h3, | ||
| 33 | h4, | ||
| 34 | h5, | ||
| 35 | h6 { | ||
| 21 | overflow-wrap: break-word; | 36 | overflow-wrap: break-word; |
| 22 | hyphens: auto; | 37 | hyphens: auto; |
| 23 | } | 38 | } |
| @@ -29,7 +44,12 @@ body { | |||
| 29 | line-height: 1.6; | 44 | line-height: 1.6; |
| 30 | } | 45 | } |
| 31 | 46 | ||
| 32 | h1, h2, h3, h4, h5, h6 { | 47 | h1, |
| 48 | h2, | ||
| 49 | h3, | ||
| 50 | h4, | ||
| 51 | h5, | ||
| 52 | h6 { | ||
| 33 | font-weight: bold; | 53 | font-weight: bold; |
| 34 | margin-bottom: 0.5em; | 54 | margin-bottom: 0.5em; |
| 35 | } | 55 | } |
| @@ -102,7 +122,8 @@ pre:has(code) { | |||
| 102 | } | 122 | } |
| 103 | } | 123 | } |
| 104 | 124 | ||
| 105 | ul, ol { | 125 | ul, |
| 126 | ol { | ||
| 106 | margin-top: 1em; | 127 | margin-top: 1em; |
| 107 | margin-bottom: 1em; | 128 | margin-bottom: 1em; |
| 108 | padding-left: 20px; | 129 | padding-left: 20px; |
| @@ -118,7 +139,8 @@ table { | |||
| 118 | width: 100%; | 139 | width: 100%; |
| 119 | } | 140 | } |
| 120 | 141 | ||
| 121 | th, td { | 142 | th, |
| 143 | td { | ||
| 122 | padding: 8px; | 144 | padding: 8px; |
| 123 | 145 | ||
| 124 | border: 1px solid #ddd; | 146 | border: 1px solid #ddd; |