From: Ardis Lu Date: Sun, 15 Oct 2023 03:28:17 +0000 (-0700) Subject: Add popover transition out X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=ff7805ff3917fe5d7789c53032c2cca66bd0069b;p=static-encrypt Add popover transition out --- diff --git a/index.html b/index.html index 7c4401a..eb9171e 100644 --- a/index.html +++ b/index.html @@ -111,23 +111,29 @@ position: relative; } + .copied::before, + .copied::after { + display: var(--display, none); + position: absolute; + background: hsl(216deg 50% 90%); + pointer-events: none; + opacity: var(--opacity, 0); + transition: opacity 200ms; + } + .copied::before { content: ''; - position: absolute; inset-inline-start: calc(100% - 4px); inset-block-start: calc(50% - 4px); inline-size: 10px; block-size: 10px; - background: hsl(216deg 50% 90%); clip-path: polygon(0 50%, 100% 0, 100% 100%); } .copied::after { content: 'Copied!'; - position: absolute; inset-inline-start: calc(100% + 4px); font-weight: 700; - background: hsl(216deg 50% 90%); padding: 8px; border-radius: 4px; } @@ -168,7 +174,7 @@

-