From f4fe9ff6c1ce2811fe9aa0272333b4732a6ebcdc Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 30 Sep 2024 17:59:05 +0800 Subject: refactor: move menu feature from editor to dumbymap --- src/css/dumbymap.css | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) (limited to 'src/css/dumbymap.css') 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 { padding: 0; position: relative; - overflow-x: auto; + overflow: visible; &::after { content: 'Layout: ' attr(data-layout); @@ -609,3 +609,70 @@ root { .bold-options { font-weight: bold; } + +.menu { + display: none; + width: fit-content; + + position: absolute; + z-index: 9999; + + border: 2px solid gray; + border-radius: 6px; + + background: white; + min-width: 10rem; + max-height: 40vh; + overflow-y: scroll; +} + +.menu-item { + display: flex; + box-sizing: border-box; + justify-content: space-between; + padding: 0.5rem; + + z-index: 9999; + + border: 2px solid transparent; + border-radius: 5px; + + cursor: pointer; + text-wrap: nowrap; + + &:hover { + background: rgb(226 232 240); + } + + .info { + padding-inline: 1em; + + color: steelblue; + font-weight: bold; + } +} + +.folder::after { + content: '⏵'; +} + +.sub-menu { + overflow: scroll; + width: fit-content; + + position: absolute; + z-index: 100; + + border: 2px solid gray; + border-radius: 6px; + + background: white; + min-width: 6rem; + max-height: 40vh; + + .menu-item { + margin: 0 auto; + padding-inline: 0.5em; + min-width: 5em; + } +} -- cgit v1.2.3-70-g09d2