monks/alignment_baseline

The alignment-baseline CSS property specifies the specific baseline used to align the box’s text and inline-level contents. Baseline alignment is the relationship among the baselines of multiple alignment subjects within an alignment context. When performing baseline alignment, the alignment-baseline property value specifies which baseline of the box is aligned to the corresponding baseline of its alignment context.

The alignment-baseline property only has an effect on inline-level boxes, flex items, grid items, table cells, and the {{SVGElement(“text”)}}, {{SVGElement(“textPath”)}}, and {{SVGElement(“tspan”)}} SVG elements. If present, it overrides the shape’s {{SVGAttr(“alignment-baseline”)}} attribute.

In an inline formatting context, inline-level box fragments and glyphs share an alignment context established by their parent inline box fragment along its inline axis. In SVG text layout, these values instead specify the baseline that is aligned to the SVG current text position.

Values

pub const after_edge: #(String, String)

after-edge value of alignment-baseline

pub const alphabetic: #(String, String)
  • : Used in writing Latin, Cyrillic, Greek, and many other scripts; matches the box’s alphabetic baseline to that of its parent, corresponding to the bottom of most, but not all characters.
pub const auto_: #(String, String)

auto value of alignment-baseline

pub const baseline: #(String, String)
  • : Use the {{cssxref(“dominant-baseline”)}} value of the parent.
pub const before_edge: #(String, String)

before-edge value of alignment-baseline

pub const central: #(String, String)
  • : Matches the box’s central baseline to the central baseline of its parent, corresponding to the ideographic central baseline, halfway between the ideographic-under and ideographic-over baselines.
pub const hanging: #(String, String)

hanging value of alignment-baseline

pub const ideographic: #(String, String)
  • : Matches the box’s ideographic character face under-side baseline to that of its parent, with the derived baseline-table constructed using the ideographic baseline-table in the font.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const mathematical: #(String, String)
  • : Matches the box’s mathematical baseline to that of its parent, corresponding to the center baseline around which mathematical characters are designed.
pub const middle: #(String, String)
  • : Aligns the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent. Uses the x-middle baselines; except under text-orientation: upright; (where the alphabetic and x-height baselines are essentially meaningless), in which case it uses the central baseline instead.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for alignment-baseline

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const text_after_edge: #(String, String)

text-after-edge value of alignment-baseline

pub const text_before_edge: #(String, String)

text-before-edge value of alignment-baseline

pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for alignment-baseline. It will be wrapped in var() and have -- prepended.

Search Document