From bd32a26653443016db7418c6583e9cdb97b4a127 Mon Sep 17 00:00:00 2001 From: Sanghyeon Lee Date: Thu, 9 Apr 2020 22:48:41 +0900 Subject: [PATCH] Move GitHub corner and visually-hidden class (#1336) * Move visually-hidden class to index.html * Replace github corner with component * Momoize GitHubCorner * Simplify component return --- public/index.html | 38 ++++++++------------------------- src/components/GitHubCorner.tsx | 32 +++++++++++++++++++++++++++ src/components/LayerUI.tsx | 4 ++++ src/styles.scss | 10 --------- 4 files changed, 45 insertions(+), 39 deletions(-) create mode 100644 src/components/GitHubCorner.tsx diff --git a/public/index.html b/public/index.html index 1da79674..494a73ea 100644 --- a/public/index.html +++ b/public/index.html @@ -155,6 +155,15 @@ padding: 0.8em 1.2em; font-size: 1.3em; } + .visually-hidden { + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); + white-space: nowrap; /* added line */ + }