(react) add the possibility to hide select label

Based on recent feedbacks this feature was needed. It is important for
the label to still be accessible to screen readers, that's why we
introduced the offscreen class.

Resolve #60
This commit is contained in:
Nathan Vasse
2023-05-19 15:28:26 +02:00
committed by NathanVss
parent c93c8d2a2f
commit d79f01fd93
13 changed files with 140 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
.c__offscreen {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}