diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-04-14 16:22:35 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-14 21:54:10 +0200 |
commit | 7c91fda088dd92907e64d38af1093db6e693f641 (patch) | |
tree | cda471ea725253e44ec5a832b16f8936b900756f /Base/res/html/misc | |
parent | 85da8cbb07322addd8838df4d4c206843d77714f (diff) | |
download | serenity-7c91fda088dd92907e64d38af1093db6e693f641.zip |
LibWeb: Allow multiple text-decoration-lines
The spec grammar for `text-decoration-line` is:
`none | [ underline || overline || line-through || blink ]`
Which means that it's either `none`, or any combination of the other
values. This patch makes that parse for `text-decoration-line` and
`text-decoration`, stores the results as a Vector, and adjusts
`paint_text_decoration()` to run as a loop over all the values that are
provided.
As noted, storing a Vector of values is a bit wasteful, as they could be
stored as flags in a single `u8`. But I was getting too confused trying
to do that in a nice way.
Diffstat (limited to 'Base/res/html/misc')
-rw-r--r-- | Base/res/html/misc/text-decoration.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Base/res/html/misc/text-decoration.html b/Base/res/html/misc/text-decoration.html index 562fb4b772..2c64113332 100644 --- a/Base/res/html/misc/text-decoration.html +++ b/Base/res/html/misc/text-decoration.html @@ -8,6 +8,7 @@ .strikethrough { text-decoration: line-through dotted green; } .blink { text-decoration: blink; } .current-color { color: #8B4513; text-decoration: underline; } +.overboard { text-decoration: double overline underline line-through magenta; } </style> </head> <body> @@ -16,5 +17,6 @@ <p class="strikethrough">Wombling</p> <p class="blink">FREE!</p> <p class="current-color">This underline should match the text color</p> + <p class="overboard">This should have an underline, overline and line-through, all in glorious magenta.</p> </body> </html> |