mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
LibWeb: Add an initial implementation of SVG text-anchor
This only handles very simple <text> elements, but this is enough (with the font-size changes) to improve the badges on the GitHub README a fair bit.
This commit is contained in:
parent
4cdb4de049
commit
30277f385c
10 changed files with 77 additions and 0 deletions
|
@ -589,6 +589,12 @@ bool StyleProperties::operator==(StyleProperties const& other) const
|
|||
return true;
|
||||
}
|
||||
|
||||
Optional<CSS::TextAnchor> StyleProperties::text_anchor() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::TextAnchor);
|
||||
return value_id_to_text_anchor(value->to_identifier());
|
||||
}
|
||||
|
||||
Optional<CSS::TextAlign> StyleProperties::text_align() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::TextAlign);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue