diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-30 17:59:05 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-01 11:35:11 +0800 |
commit | f4fe9ff6c1ce2811fe9aa0272333b4732a6ebcdc (patch) | |
tree | 6bde54a5c2afe37fb4bea6a00b492e74a0720e16 /src/css/dumbymap.css | |
parent | 193ba872c455296bff55e5f6a7d6dbbbb85c265e (diff) |
refactor: move menu feature from editor to dumbymap
Diffstat (limited to 'src/css/dumbymap.css')
-rw-r--r-- | src/css/dumbymap.css | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index f6275ab..822353f 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css | |||
@@ -226,7 +226,7 @@ root { | |||
226 | padding: 0; | 226 | padding: 0; |
227 | 227 | ||
228 | position: relative; | 228 | position: relative; |
229 | overflow-x: auto; | 229 | overflow: visible; |
230 | 230 | ||
231 | &::after { | 231 | &::after { |
232 | content: 'Layout: ' attr(data-layout); | 232 | content: 'Layout: ' attr(data-layout); |
@@ -609,3 +609,70 @@ root { | |||
609 | .bold-options { | 609 | .bold-options { |
610 | font-weight: bold; | 610 | font-weight: bold; |
611 | } | 611 | } |
612 | |||
613 | .menu { | ||
614 | display: none; | ||
615 | width: fit-content; | ||
616 | |||
617 | position: absolute; | ||
618 | z-index: 9999; | ||
619 | |||
620 | border: 2px solid gray; | ||
621 | border-radius: 6px; | ||
622 | |||
623 | background: white; | ||
624 | min-width: 10rem; | ||
625 | max-height: 40vh; | ||
626 | overflow-y: scroll; | ||
627 | } | ||
628 | |||
629 | .menu-item { | ||
630 | display: flex; | ||
631 | box-sizing: border-box; | ||
632 | justify-content: space-between; | ||
633 | padding: 0.5rem; | ||
634 | |||
635 | z-index: 9999; | ||
636 | |||
637 | border: 2px solid transparent; | ||
638 | border-radius: 5px; | ||
639 | |||
640 | cursor: pointer; | ||
641 | text-wrap: nowrap; | ||
642 | |||
643 | &:hover { | ||
644 | background: rgb(226 232 240); | ||
645 | } | ||
646 | |||
647 | .info { | ||
648 | padding-inline: 1em; | ||
649 | |||
650 | color: steelblue; | ||
651 | font-weight: bold; | ||
652 | } | ||
653 | } | ||
654 | |||
655 | .folder::after { | ||
656 | content: '⏵'; | ||
657 | } | ||
658 | |||
659 | .sub-menu { | ||
660 | overflow: scroll; | ||
661 | width: fit-content; | ||
662 | |||
663 | position: absolute; | ||
664 | z-index: 100; | ||
665 | |||
666 | border: 2px solid gray; | ||
667 | border-radius: 6px; | ||
668 | |||
669 | background: white; | ||
670 | min-width: 6rem; | ||
671 | max-height: 40vh; | ||
672 | |||
673 | .menu-item { | ||
674 | margin: 0 auto; | ||
675 | padding-inline: 0.5em; | ||
676 | min-width: 5em; | ||
677 | } | ||
678 | } | ||