LibWeb: Implement dominant-baseline for SVG text

This property determines the default baseline used to align content
within the given box.
This commit is contained in:
Tim Ledbetter
2026-02-25 20:46:37 +00:00
committed by Jelle Raaijmakers
parent 90a211bf47
commit f05bc7c0cd
Notes: github-actions[bot] 2026-02-26 08:24:27 +00:00
25 changed files with 311 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<svg viewBox="0 0 400 400" width="400" height="400" xmlns="http://www.w3.org/2000/svg">
<line x1="0" y1="50" x2="400" y2="50" stroke="gray" stroke-width="0.5"/>
<line x1="0" y1="100" x2="400" y2="100" stroke="gray" stroke-width="0.5"/>
<line x1="0" y1="150" x2="400" y2="150" stroke="gray" stroke-width="0.5"/>
<line x1="0" y1="200" x2="400" y2="200" stroke="gray" stroke-width="0.5"/>
<line x1="0" y1="250" x2="400" y2="250" stroke="gray" stroke-width="0.5"/>
<line x1="0" y1="300" x2="400" y2="300" stroke="gray" stroke-width="0.5"/>
<line x1="0" y1="350" x2="400" y2="350" stroke="gray" stroke-width="0.5"/>
<text x="10" y="50" font-size="20" font-family="SerenitySans" dominant-baseline="auto">auto</text>
<text x="10" y="100" font-size="20" font-family="SerenitySans" dominant-baseline="alphabetic">alphabetic</text>
<text x="10" y="150" font-size="20" font-family="SerenitySans" dominant-baseline="central">central</text>
<text x="10" y="200" font-size="20" font-family="SerenitySans" dominant-baseline="middle">middle</text>
<text x="10" y="250" font-size="20" font-family="SerenitySans" dominant-baseline="hanging">hanging</text>
<text x="10" y="300" font-size="20" font-family="SerenitySans" dominant-baseline="ideographic">ideographic</text>
<text x="10" y="350" font-size="20" font-family="SerenitySans" dominant-baseline="mathematical">mathematical</text>
</svg>