scss-reset icon indicating copy to clipboard operation
scss-reset copied to clipboard

html, body { overflow-x: hidden; }

Open andreymatin opened this issue 1 year ago • 0 comments

Hiding the horizontal scroll prevents unwanted behavior caused by unintentional layout stretching when working with CMS, vendor libraries, or popular CSS frameworks.

html, body {       
  overflow-x: hidden;     
}

Currently, this is implemented as an SCSS mixin offx. However, since layout errors occur more frequently, it makes sense to default to a fixed horizontal layout.

Yeah, it breaks position: sticky because it only works inside a container that has the ability to scroll.

But we can create another mixin that restores scrolling for html, body. And also need to expand the documentation to cover this case.

andreymatin avatar Jan 29 '25 17:01 andreymatin