From 1b427ca548ff2d9b7eea6cb8c24e574365691297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thibaud?= Date: Thu, 25 Nov 2021 11:05:46 +0100 Subject: [PATCH] feat (mixin) : add invisible scrollbar mixin --- CHANGELOG.md | 3 +++ src/scss/abstract/_index.scss | 1 + src/scss/abstract/_m-invisible-scrollbar.scss | 14 ++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 src/scss/abstract/_m-invisible-scrollbar.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index f5d92b93..cb2ca18b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 5.0.9 +- Add invisible scrollbar SCSS mixin + # 5.0.8 - Fix filename for editor script and editor style diff --git a/src/scss/abstract/_index.scss b/src/scss/abstract/_index.scss index d4d65475..ccb71ff9 100644 --- a/src/scss/abstract/_index.scss +++ b/src/scss/abstract/_index.scss @@ -26,6 +26,7 @@ @import "./m-hardware"; @import "./m-hover"; @import "./m-img-responsive"; +@import "./m-invisible-scrollbar"; @import "./m-placeholder"; @import "./m-placeholder-media"; @import "./m-pseudo-content"; diff --git a/src/scss/abstract/_m-invisible-scrollbar.scss b/src/scss/abstract/_m-invisible-scrollbar.scss new file mode 100644 index 00000000..3d3fabc8 --- /dev/null +++ b/src/scss/abstract/_m-invisible-scrollbar.scss @@ -0,0 +1,14 @@ +/** + * Invisible scrollbar + * + * /!\ ALERT : Don't use this mixin neither on the html element, nor on the body element to avoid deteriorating accessibility + */ + +@mixin invisible-scrollbar { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + + &::-webkit-scrollbar { + display: none; + } +}