From ff7805ff3917fe5d7789c53032c2cca66bd0069b Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 14 Oct 2023 20:28:17 -0700 Subject: [PATCH] Add popover transition out --- index.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) 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 @@

-