aboutsummaryrefslogtreecommitdiffstats
path: root/src/scss/base/_helpers.scss
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-10-30 22:11:00 +0200
committerArmand Philippot <git@armandphilippot.com>2021-10-30 22:52:23 +0200
commit3a3baddad1c801d77dc398d2c6980f3c14f4a47c (patch)
tree9e06aef730504470111c010e53a1857f7b01ab83 /src/scss/base/_helpers.scss
parentc3045b163e74b42c0a0e71c646740c76d3bb5ba1 (diff)
chore: move htdocs to repo root
Diffstat (limited to 'src/scss/base/_helpers.scss')
-rw-r--r--src/scss/base/_helpers.scss44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/scss/base/_helpers.scss b/src/scss/base/_helpers.scss
new file mode 100644
index 0000000..d6a9233
--- /dev/null
+++ b/src/scss/base/_helpers.scss
@@ -0,0 +1,44 @@
+@use "../abstracts/functions" as fun;
+@use "../abstracts/mixins" as mix;
+
+.hide {
+ display: none !important;
+}
+
+/* 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;
+ }
+}