servo/tests/wpt/css-tests/css-variables-1_dev/html/vars-font-shorthand-001.htm
Ms2ger 296fa2512b Update web-platform-tests and CSS tests.
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180.
- Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
2017-02-06 22:38:29 +01:00

69 lines
No EOL
1.3 KiB
HTML

<!DOCTYPE html>
<html><head><title>CSS Variables 1: Test variables in @font-face, font-family, font shorthand.</title>
<link href="mailto:lea@verou.me" rel="author" title="Lea Verou">
<link href="https://www.w3.org/TR/css-variables-1/#variables-in-shorthands" rel="help">
<link href="reference/vars-font-shorthand-001-ref.htm" rel="match">
<meta content="ahem" name="flags">
<style>
@font-face {
font-family: Ahem;
src: url(https://cdn.rawgit.com/w3c/csswg-test/master/fonts/ahem/ahem.ttf);
}
div {
width: 150px;
height: 150px;
margin: 10px;
display: inline-block;
vertical-align: middle;
background: red;
text-align: center;
color: green;
overflow: hidden;
}
div#d1 {
--foo: Ahem;
font-family: var(--foo);
font-size: 150px;
line-height: 1;
}
div#d2 {
--foo: 0 Ahem;
font: var(--foo);
font-size: 150px;
line-height: 150px;
}
div#d3 {
--foo: Ahem, sans-serif;
font: 150px/1 var(--foo);
}
div#d4 {
--foo: Ahem;
font: 150px/1 var(--foo), sans-serif;
}
div#d5 {
--foo: 1 Ahem;
font: 150px/var(--foo);
}
div#d6 {
--foo: 150px/1 Ahem;
font: var(--foo);
}
</style>
</head><body><p>Test passes if you see six green squares, and no red.</p>
<div id="d1">X</div>
<div id="d2">X</div>
<div id="d3">X</div>
<div id="d4">X</div>
<div id="d5">X</div>
<div id="d6">X</div>
</body></html>