Skip to content

Box Sizing

Control how width and height are calculated

Syntax

layout="box:[value]"

Values

ValueCSS OutputDescription
borderbox-sizing: border-boxInclude padding and border in size
contentbox-sizing: content-boxExclude padding and border

Examples

html
<div layout="box:border">Border box</div>

Preview

Border Box

layout="box:border" - Padding and border included in width

box:border
100px
View Code
html
<div layout="flex" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <div layout="box:border" space="p:medium" visual="bg:primary text:white border:4 border:white rounded:small" style="width: 100px;">box:border<br>100px</div>
</div>