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

LibWeb: Support CSS font shorthand with up to 4 consecutive normal

All of the following properties in the font shorthand can be `normal`:

- font-style
- font-variant
- font-weight
- font-stretch

This means that we must allow up to four consecutive `normal` at the
start of a font shorthand value.
This commit is contained in:
Andreas Kling 2023-07-04 15:13:33 +02:00 committed by Jelle Raaijmakers
parent 793c2ff65a
commit 6b3b056476
3 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,30 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x216 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x200 children: inline
line 0 width: 424, height: 200, bottom: 200, baseline: 159.960937
frag 0 from TextNode start: 0, length: 1, rect: [8,8 79.296875x200]
"1"
frag 1 from TextNode start: 0, length: 1, rect: [87,154 8x17.46875]
" "
frag 2 from TextNode start: 0, length: 1, rect: [95,8 110.15625x200]
"2"
frag 3 from TextNode start: 0, length: 1, rect: [205,154 8x17.46875]
" "
frag 4 from TextNode start: 0, length: 1, rect: [213,8 113.671875x200]
"3"
frag 5 from TextNode start: 0, length: 1, rect: [327,154 8x17.46875]
" "
frag 6 from TextNode start: 0, length: 1, rect: [335,8 96.875x200]
"4"
InlineNode <span.one>
TextNode <#text>
TextNode <#text>
InlineNode <span.two>
TextNode <#text>
TextNode <#text>
InlineNode <span.three>
TextNode <#text>
TextNode <#text>
InlineNode <span.four>
TextNode <#text>
TextNode <#text>