diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-10 18:49:31 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-10 22:54:35 +0800 |
commit | d5851a2dfe728a5b5cd4e913df31e9b63baed99b (patch) | |
tree | 87d21591f294a990dafc29c733c05cafcb8d44d7 | |
parent | 963f1ecf81ca2938364b5defdad5bd059c851601 (diff) |
feat(CSS): add transition of draggable blocks
-rw-r--r-- | src/css/dumbymap.css | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index fe6c0d7..d810429 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css | |||
@@ -637,8 +637,6 @@ a[href^='http']:not(:has(img))::after, | |||
637 | } | 637 | } |
638 | 638 | ||
639 | .draggable-block { | 639 | .draggable-block { |
640 | /* TODO transition for display */ | ||
641 | display: none; | ||
642 | overflow: visible; | 640 | overflow: visible; |
643 | width: fit-content; | 641 | width: fit-content; |
644 | 642 | ||
@@ -650,15 +648,20 @@ a[href^='http']:not(:has(img))::after, | |||
650 | background: white; | 648 | background: white; |
651 | 649 | ||
652 | font-size: 0.8rem; | 650 | font-size: 0.8rem; |
651 | |||
652 | transition: | ||
653 | opacity .3s linear, | ||
654 | visibility .3s linear; | ||
655 | visibility: hidden; | ||
656 | opacity: 0; | ||
653 | pointer-events: auto; | 657 | pointer-events: auto; |
654 | 658 | ||
655 | &:has(.dumby-block.focus) { | 659 | &:has(.dumby-block.focus) { |
656 | display: block; | 660 | visibility: visible; |
657 | 661 | opacity: 1; | |
658 | outline: solid #505050 1px; | ||
659 | border-color: #505050; | ||
660 | } | 662 | } |
661 | 663 | ||
664 | /** Hide block with map in focus, which is the only element */ | ||
662 | &:has(pre:only-child [data-placeholder]:only-child) { | 665 | &:has(pre:only-child [data-placeholder]:only-child) { |
663 | display: none; | 666 | display: none; |
664 | } | 667 | } |