files/en-us/web/css/reference/values/box-edge/index.md
The <box-edge> value types represent a box edge keyword, such as content-box and border-box. The box-edge keywords are used to define different aspects of an element's box model and how elements are positioned and rendered on screen.
The box-edge keywords are the components of, but not limited to, the data types <visual-box>, <layout-box>, <paint-box>, <coord-box>, and <geometry-box>. These types are applied to properties such as {{cssxref("transform-box")}} and {{cssxref("background-clip")}}.
<visual-box> = content-box | padding-box | border-box /* the three <box> values */
<layout-box> = <visual-box> | margin-box /* the <shape-box> values */
<paint-box> = <visual-box> | fill-box | stroke-box
<coord-box> = <paint-box> | fill-box | stroke-box | view-box
<geometry-box> = <shape-box> | fill-box | stroke-box | view-box
A <box-edge> can be of the type <visual-box>, <layout-box>, <paint-box>, <coord-box>, or <geometry-box>.
<visual-box>
<box>, this value excludes the margin area. This value type is used for the {{cssxref("background-clip")}} and {{cssxref("overflow-clip-margin")}} properties.<layout-box>
<shape-box>, this value type is used for the {{cssxref("shape-outside")}} property.<paint-box>
margin-box.<coord-box>
<geometry-box>
The <box-edge> keywords are defined as follows:
content-box
fill-box.padding-box
content-box. In SVG, padding-box is treated as fill-box. The padding area surrounds the content area, starting at the outer edge of the content box.border-box
padding-box. In SVG, border-box is treated as stroke-box. The border area surrounds the padding area, starting at the outer edge of the padding box.margin-box
border-box. In SVG, margin-box is treated as stroke-box.fill-box
fill-box is treated as content-box. It is used to wrap the content around the edges defined by the coord-box values.stroke-box
stroke-box is treated as border-box. It is used to define the shape of the element when strokes are applied.view-box
view-box is treated as border-box.
[!NOTE] When the SVG viewport is not anchored at the origin, the origin box does not correspond to the SVG viewport.
{{Specifications}}