diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-10-24 18:19:05 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-10-24 18:19:05 +0200 |
| commit | 2716256c665e39b0e217dac1f3bb560a14c101e1 (patch) | |
| tree | 3dabb8af334f9abe27742768bb77be672d628092 /htdocs/src/scss/base/_helpers.scss | |
| parent | 680a7ecd6046820c7495ac103495215b5ccaabd5 (diff) | |
chore: add styles
Diffstat (limited to 'htdocs/src/scss/base/_helpers.scss')
| -rw-r--r-- | htdocs/src/scss/base/_helpers.scss | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/htdocs/src/scss/base/_helpers.scss b/htdocs/src/scss/base/_helpers.scss new file mode 100644 index 0000000..2e85a51 --- /dev/null +++ b/htdocs/src/scss/base/_helpers.scss @@ -0,0 +1,44 @@ +@use "../abstracts/functions" as fun; +@use "../abstracts/mixins" as mix; + +.hide { + display: none; +} + +/* Text meant only for screen readers. */ +.screen-reader-text { + border: 0; + clip: rect(1px, 1px, 1px, 1px); + height: fun.convert-px(1); + overflow: hidden; + padding: 0; + position: absolute !important; + width: fun.convert-px(1); + word-break: normal; + word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */ + + &:focus { + background: fun.get-var(color-bg); + border: fun.convert-px(3) solid fun.get-var(color-border); + box-shadow: 0 0 fun.convert-px(2) fun.convert-px(2) + fun.get-var(color-shadow-light); + clip: auto !important; + color: fun.get-var(color-primary); + display: block; + font-size: fun.get-var(font-size-md); + font-weight: 600; + height: auto; + left: 0; + padding: fun.get-var(spacing-sm) fun.get-var(spacing-md); + top: 0; + width: auto; + z-index: 100000; + } +} + +@include mix.motion("reduce") { + * { + animation: none !important; + transition: none !important; + } +} |
