Bug 228540 - The computed value of the font-weight property should be a number
Summary: The computed value of the font-weight property should be a number
Status: RESOLVED DUPLICATE of bug 214230
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-28 00:44 PDT by Šime Vidas
Modified: 2021-07-28 04:13 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Šime Vidas 2021-07-28 00:44:30 PDT
Open this HTML document in Safari:

<!doctype html>
<b>lorem ipsum</b>
<script>
  console.log(
    getComputedStyle(document.querySelector('b')).getPropertyValue('font-weight')
  )
</script>

Online version: https://output.jsbin.com/canijip/quiet

In Chrome and Firefox, the console logs "700", but in Safari it logs "bold". The CSS Fonts specification [1] states that the computed value of the font-weight property is a number, so Safari should return "700" like the other browsers.

[1]: https://drafts.csswg.org/css-fonts/#font-weight-prop
Comment 1 Sam Sneddon [:gsnedders] 2021-07-28 04:13:32 PDT

*** This bug has been marked as a duplicate of bug 214230 ***