Files
rust_browser/tests/goldens/fixtures/166-box-sizing.html
Zachary D. Rowitsch d768ae25da Implement box-sizing CSS property (content-box / border-box)
Add box-sizing support across the rendering pipeline so that
width/height can refer to either the content-box (default) or the
border-box (content + padding + border). This is one of the most
commonly used CSS properties and is required by virtually every
modern CSS reset.

The implementation adjusts width/height resolution in block, flex,
grid, and table layout engines, and defaults tables to border-box
in the UA stylesheet to match Chrome/Firefox/Safari behavior.

Five previously-failing WPT tests now pass and are promoted in the
manifest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:25:58 -05:00

28 lines
454 B
HTML

<!DOCTYPE html>
<html>
<head>
<style>
.content-box {
box-sizing: content-box;
width: 200px;
height: 100px;
padding: 10px;
border: 5px solid black;
background-color: #ccc;
}
.border-box {
box-sizing: border-box;
width: 200px;
height: 100px;
padding: 10px;
border: 5px solid black;
background-color: #aaa;
}
</style>
</head>
<body>
<div class="content-box">content-box</div>
<div class="border-box">border-box</div>
</body>
</html>