The CSS layout-grid-char property controls the size of the character grid for the layout of an element's text content when the layout-grid-mode is set to line or both. Visually, this property has an effect similar to the line-height property. It is used because Asian languages often employ page layout for characters for better visual formatting using a one or two-dimensional grid.
Values[]
| Value | Description |
|---|---|
none |
No character grid is used. |
auto |
The largest character in the font for the current element is used to determine the character grid. |
<length> |
Refers to either an absolute measurement or a relative measurement based on the current element's font size. Examples are cm, pt, px, etc.
|
<percentage> |
The percentage is relative to the height/width of the parent element. |
HTML example:
<div style="layout-grid-mode:line; layout-grid-char:12px;">
Content snapped to a layout grid</div>
CSS example:
div {
layout-grid-mode:line;
layout-grid-char:12px;
}
