1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 00:47:45 +00:00

LibWeb: Adapt parse_position() into parse_position_value()

Having two ways that `<position>` is represented is awkward and
unnecessary. So, let's combine the two paths together. This first step
copies and modifies the `parse_position()` code to produce a
`PositionStyleValue`.

Apart from returning a StyleValue, this also makes use of automatic enum
parsing instead of manually comparing identifier strings.
This commit is contained in:
Sam Atkins 2023-11-07 11:50:44 +00:00 committed by Sam Atkins
parent 4ad58f0204
commit 8917378aa7
4 changed files with 206 additions and 0 deletions

View file

@ -334,6 +334,7 @@
"sticky"
],
"position-edge": [
"center",
"left",
"right",
"top",