From: Ardis Lu Date: Thu, 20 Apr 2023 02:20:34 +0000 (-0700) Subject: Replace ID with class X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=32b301ec45a5a5f68d69e3be61de8a76fe254f6c;p=utf-8-visualizer Replace ID with class The "github" ID is already used by the tag within <svg> --- diff --git a/index.html b/index.html index 035b30a..ff2c5f3 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ <div></div> <footer> - <a id="github" href="https://github.com/ardislu/utf-8-visualizer"> + <a class="icon-link" href="https://github.com/ardislu/utf-8-visualizer"> <svg aria-labelledby="github" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <title id="github">GitHub repository diff --git a/style.css b/style.css index 66bba8c..9c5f011 100644 --- a/style.css +++ b/style.css @@ -59,7 +59,7 @@ a { text-decoration: inherit; } -a#github { +a.icon-link { line-height: 0; background: hsl(222deg 50% 30%); color: hsl(222deg 50% 95%); @@ -68,19 +68,19 @@ a#github { transition: filter 800ms; } -a#github:hover, -a#github:focus-within { +a.icon-link:hover, +a.icon-link:focus-within { filter: brightness(120%) drop-shadow(0 0 4px hsl(222deg 50% 50%)); transition: filter 400ms; } -a#github>svg { +a.icon-link>svg { inline-size: 24px; block-size: 24px; transition: transform 600ms; } -:is(a#github:hover, a#github:focus-within)>svg { +:is(a.icon-link:hover, a.icon-link:focus-within)>svg { transform: translateY(-2px); transition: transform 200ms; }