The box-content utility deliberately sizes the inner area. This can help when reproducing a measured content region with a separate frame.
Worked example
<div class="demo box-content w-48 p-4 border-4 border-teal-700">
Content-box sizing
</div>Implementation notes
Intrinsic content that grows after fonts load can change the required outer size. Reserve enough room if matching a fixed external frame.
Try it yourself
Add a border and verify the difference between content and outer dimensions.
Open the Tailwind CSS example →Editorial date July 16, 2026 · Published December 6, 2026