mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
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:
committed by
Jelle Raaijmakers
parent
90a211bf47
commit
f05bc7c0cd
Notes:
github-actions[bot]
2026-02-26 08:24:27 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/f05bc7c0cd3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8173 Reviewed-by: https://github.com/gmta ✅
17
Tests/LibWeb/Layout/input/svg-text-dominant-baseline.html
Normal file
17
Tests/LibWeb/Layout/input/svg-text-dominant-baseline.html
Normal 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>
|
||||
Reference in New Issue
Block a user