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,