From e206d7a9084b80be68a9d0697620cacbdf593c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Wed, 26 Nov 2025 19:30:27 +0100 Subject: [PATCH] fix: Fix white space on left side when scrollbar is present (#2548) --- .changeset/fix-white-space-scrollbar.md | 5 +++++ core/scss/layout/_core.scss | 8 ++++++++ core/scss/layout/_root.scss | 5 ----- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .changeset/fix-white-space-scrollbar.md diff --git a/.changeset/fix-white-space-scrollbar.md b/.changeset/fix-white-space-scrollbar.md new file mode 100644 index 000000000..6528c96dd --- /dev/null +++ b/.changeset/fix-white-space-scrollbar.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Fixed white space on left side when scrollbar is present by replacing `margin-inline-start: calc(100vw - 100%)` with `scrollbar-gutter: stable` on `html` element, with `overflow-y: scroll` fallback for unsupported browsers. diff --git a/core/scss/layout/_core.scss b/core/scss/layout/_core.scss index 6d60f6941..f851a8ac0 100644 --- a/core/scss/layout/_core.scss +++ b/core/scss/layout/_core.scss @@ -1,5 +1,13 @@ @use 'sass:map'; +html { + scrollbar-gutter: stable; + + @supports not (scrollbar-gutter: stable) { + overflow-y: scroll; + } +} + // stylelint-disable property-no-vendor-prefix body { letter-spacing: $body-letter-spacing; diff --git a/core/scss/layout/_root.scss b/core/scss/layout/_root.scss index d5516dc92..6f7f0f9d6 100644 --- a/core/scss/layout/_root.scss +++ b/core/scss/layout/_root.scss @@ -2,11 +2,6 @@ :host { font-size: 16px; height: 100%; - - @include media-breakpoint-up(lg) { - margin-inline-start: calc(100vw - 100%); - margin-inline-end: 0; - } } :root,