mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Resolve CSS font property from value list
The font property now resolves into its various parts: - font-family - font-weight - font-size - font-style - line-height The font-variant and font-stretch parts are left unparsed since LibWeb doesn't know how to render those. Added `fonts.html` as a test for various forms of `font` declarations, based on the examples in the spec.
This commit is contained in:
parent
a44d7670ab
commit
82f3228dd2
4 changed files with 251 additions and 2 deletions
28
Base/res/html/misc/fonts.html
Normal file
28
Base/res/html/misc/fonts.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS test</title>
|
||||
<style type="text/css">
|
||||
#monospace { font: 20px monospace; }
|
||||
#a { font: 12pt/14pt sans-serif; }
|
||||
#b { font: 80% cursive; }
|
||||
#c { font: x-large/110% fantasy, serif; }
|
||||
#d { font: 2em SerenitySans; }
|
||||
#e { font: bold italic large Helvetica, sans-serif; }
|
||||
#f { font: normal small-caps 120%/120% monospace; }
|
||||
#g { font: condensed oblique 12pt "Helvetica Neue", serif; }
|
||||
#h { font: condensed oblique 25deg 12pt "Helvetica Neue", serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="monospace">font: 20px monospace;</div>
|
||||
<div id="a">font: 12pt/14pt sans-serif;</div>
|
||||
<div id="b">font: 80% cursive;</div>
|
||||
<div id="c">font: x-large/110% fantasy, serif;</div>
|
||||
<div id="d">font: 2em SerenitySans;</div>
|
||||
<div id="e">font: bold italic large Helvetica, sans-serif;</div>
|
||||
<div id="f">font: normal small-caps 120%/120% monospace;</div>
|
||||
<div id="g">font: condensed oblique 12pt "Helvetica Neue", serif;</div>
|
||||
<div id="h">font: condensed oblique 25deg 12pt "Helvetica Neue", serif;</div>
|
||||
</body>
|
||||
</html>
|
|
@ -48,6 +48,7 @@
|
|||
<ul>
|
||||
<li><a href="justify-content.html">Flexbox justify-content</a></li>
|
||||
<li><a href="lists.html">Lists</a></li>
|
||||
<li><a href="fonts.html">Fonts</a></li>
|
||||
<li><a href="border-radius.html">Border-Radius</a></li>
|
||||
<li><a href="custom-properties.html">Custom Properties</a></li>
|
||||
<li><a href="flex.html">Flexboxes</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue