Hey! Is this a bug related to how .astro files handle box-sizing: border-box; or am I misunderstanding something?
Take a look at the attached .astro file. When previewing this file in the dev server, the gray box exceeds the dimensions of my viewport and results in horizontal and vertical scrolling.
However, if you convert that same file into .html and view it in your browser, it acts as expected: the gray box is fully contained within the viewport without scrolling.
Thanks!
Edit: Adding the code here for convenience:
<!doctype html>
<html lang="en">
<head>
<style>
html {
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 100%;
}
*,
::after,
::before {
-webkit-box-sizing: inherit;
box-sizing: inherit;
}
body { margin: 2rem; }
.box {
/* This width shouldn't(?) affect the layout. As a .astro file it does, as a .html file it does not */
width: 100%;
/* This height calculation should not result in vertical scrolling. As a .astro file it does, as a .html file it does not */
height: calc(100vh - 4rem);
/* Hiding this padding value "fixes" the issue in the .astro file, but padding shouldn't(?) affect the box width */
padding: 3rem;
background: #ccc;
}
</style>
</head>
<body>
<div class="box"><p>Hello, world!</p></div>
</body>
</html>