Skip to content

[css-fonts-4] font-stretch computed value. #2605

@emilio

Description

@emilio

https://drafts.csswg.org/css-fonts-4/#font-stretch-prop says:

Computed Value: as specified.

I think the computed value should be a <percentage>, perhaps with a getComputedStyle quirk to keep the keyword serialization in the case where the percentage matches one of the keywords?

That being said, the following page shows 100% on Chrome, so it means that they managed to ship it without the quirk, which is simpler:

<!doctype html>
<div id="test" style="font-stretch: normal"></div>
<pre>
<script>
  document.write(getComputedStyle(test).fontStretch);
</script>
</pre>

I don't have Edge or Safari around to test this (Epiphany builds without var fonts).

We plan to implement Chrome's behavior here unless we need the old behavior for compat.

cc @drott @litherum @FremyCompany

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions