Skip to content

Commit

Permalink
fontWeight '700' is synonymous with 'bold'
Browse files Browse the repository at this point in the history
According to the CSS spec:
The keyword 'normal' is synonymous with '400', and 'bold' is synonymous with '700'.
https://www.w3.org/TR/CSS2/fonts.html#font-boldness

Fixes #1456
  • Loading branch information
benbro authored May 16, 2017
1 parent 01e567e commit a5f3b3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function matchStyles(node, delta) {
if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {
formats.italic = true;
}
if (style.fontWeight && computeStyle(node).fontWeight === 'bold') {
if (style.fontWeight && (computeStyle(node).fontWeight === 'bold' || computeStyle(node).fontWeight === '700')) {
formats.bold = true;
}
if (Object.keys(formats).length > 0) {
Expand Down

0 comments on commit a5f3b3c

Please sign in to comment.