1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-09-02 02:22:37 +02:00

refactor: add visually-hidden util

This commit is contained in:
BcRikko
2019-07-03 17:49:55 +09:00
parent 1574e56891
commit c40598341e
5 changed files with 18 additions and 11 deletions

View File

@@ -3,3 +3,4 @@
@import "animations.scss";
@import "icon-mixin.scss";
@import "rounded-corners-mixin.scss";
@import "visually-hidden.scss";

View File

@@ -0,0 +1,13 @@
/* https://medium.com/@matuzo/writing-css-with-accessibility-in-mind-8514a0007939 */
@mixin visually-hidden() {
// position: absolute;
// margin: -1px;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
clip-path: inset(50%);
}