From 9db4cdf1758599474dcd979ab40456e70e3825f8 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 17 Oct 2024 23:38:40 +0800 Subject: feat(CSS): move site-only rules into index.css --- src/css/dumbymap.css | 60 -------------------------------------------------- src/css/index.css | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index cc161fa..f13119a 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css @@ -166,58 +166,6 @@ root { } } -.DumbyMap.Dumby[data-layout] .dumby-block { - padding: 1rem 1rem 1rem 2rem; - - position: relative; - - counter-increment: block; - - &::before { - content: ''; - height: calc(100% - 2rem); - - position: absolute; - left: 0.8rem; - - border-left: 0.5em solid #e0e0e0; - - transition: border-color 0.5s linear; - } - - &.focus { - /* Dress up when block is focus */ - - /* background: var(--block-focus-color); */ - &::before { - border-color: chocolate; - } - - &::after { - content: counter(block) '/' attr(data-total); - padding: 0.3rem 0.5rem; - - position: absolute; - left: 50%; - top: 50%; - z-index: 9999; - - border: solid transparent; - border-radius: 5px; - - background: gray; - - color: white; - font-size: 1.5em; - font-weight: bold; - - transform: translate(-50%, -50%); - opacity: 0; - animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); - } - } - -} .menu { display: block; @@ -495,14 +443,6 @@ root { } } -.DumbyMap.Dumby[data-layout='normal'] { - max-width: 60em; - - &::after { - animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); - } -} - .Dumby[data-layout='side-by-side'] { &::after { animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); diff --git a/src/css/index.css b/src/css/index.css index 7ae5906..badec7e 100644 --- a/src/css/index.css +++ b/src/css/index.css @@ -178,3 +178,65 @@ main[data-mode='editing'] { } } } + +.Dumby[data-layout] .dumby-block { + padding: 1rem 1rem 1rem 2rem; + + position: relative; + + counter-increment: block; + + &::before { + content: ''; + height: calc(100% - 2rem); + + position: absolute; + left: 0.8rem; + + border-left: 0.5em solid #e0e0e0; + + transition: border-color 0.5s linear; + } + + &.focus { + /* Dress up when block is focus */ + + /* background: var(--block-focus-color); */ + &::before { + border-color: chocolate; + } + + &::after { + content: counter(block) '/' attr(data-total); + padding: 0.3rem 0.5rem; + + position: absolute; + left: 50%; + top: 50%; + z-index: 9999; + + border: solid transparent; + border-radius: 5px; + + background: gray; + + color: white; + font-size: 1.5em; + font-weight: bold; + + transform: translate(-50%, -50%); + opacity: 0; + animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); + } + } + +} + +.Dumby[data-layout='normal'] { + max-width: 60em; + + &::after { + animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21); + } +} + -- cgit v1.2.3-70-g09d2