Skip to content
Permalink
Browse files

CSS: font-family initial value unspecified

https://drafts.csswg.org/css-fonts-4/#font-family-prop
Initial: depends on user agent

We can't simply have "times new roman"
in our test expectations, as Mac 10.10 .. 10.12 have
Times instead.

Bug: 966249
Change-Id: I091924585e05b2b085ab420ac553233f7346e79d
  • Loading branch information
ericwilligers authored and chromium-wpt-export-bot committed Jul 11, 2019
1 parent eb234f6 commit 5a0bd22014f8b26b13ce901024ac07b8d73e7223
Showing with 3 additions and 4 deletions.
  1. +1 −3 css/css-fonts/inheritance.html
  2. +2 −1 css/support/inheritance-testcommon.js
@@ -12,7 +12,6 @@
<script src="/css/support/inheritance-testcommon.js"></script>
<style>
#box {
font: initial;
font-size: medium;
}
</style>
@@ -25,10 +24,9 @@
<script>
'use strict';
const box = document.getElementById('box');
const initialFontFamily = getComputedStyle(box).fontFamily;
const mediumFontSize = getComputedStyle(box).fontSize;
assert_inherited('font-family', initialFontFamily, '"Not Initial!"');
assert_inherited('font-family', null, '"Not Initial!"'); // Initial value depends on user agent.
assert_inherited('font-feature-settings', 'normal', '"smcp", "swsh" 2');
assert_inherited('font-kerning', 'auto', 'none');
assert_inherited('font-size', mediumFontSize /* medium */, '123px');
@@ -33,7 +33,8 @@ function assert_initial(property, initial) {
* value.
*/
function assert_inherited(property, initial, other) {
assert_initial(property, initial);
if (initial)
assert_initial(property, initial);

test(() => {
const container = document.getElementById('container');

0 comments on commit 5a0bd22

Please sign in to comment.
You can’t perform that action at this time.