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-baselineproperty 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 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 baseline: #(String, String)
- : Use the {{cssxref(“dominant-baseline”)}} value of the parent.
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 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 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 thecentralbaseline instead.
pub fn raw(value: String) -> #(String, String)
Enter a raw string value for alignment-baseline
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