1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:47:35 +00:00
serenity/Base/res/html/misc/fonts.html
Sam Atkins 82f3228dd2 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.
2021-07-22 23:09:01 +02:00

28 lines
1.2 KiB
HTML

<!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>