Font-weight:bolder for fonts with multiple weights#342
Conversation
|
I think the main reason not to use the value The demo below shows this issue in Safari 7.0.4. |
|
@ethantw Can't check your demo on Safari 7.0.4. now (I only was able to check on Safari 6.1.3 and it looks ok) but in your demo used only strong {
font-weight: bolder;
}so calculated value of weight will be 900. Not 700, because in browser css @ethantw can you please test with strong {
font-weight: inherit;
}
strong {
font-weight: bolder;
}and post screenshot here if it fails. |
|
Sorry for the fairly late reply. I have tried out what you suggested and your solution works :) But I think what you said about weight inheritance isn’t accurate. From the same paragraph you mentioned about CSS Fonts,
When we write |
|
Behavior of the |
|
Agree. |
- `strong`, `dfn` and `b` - based on: necolas/normalize.css#342
|
Hi paul, I am happy to read your issue. I apply this change on our own unofficial fork of normalize at work for some months. But I don't know why, WebKit has removed this behavior even though the W3C suggests to do the contrary (your way): http://www.w3.org/TR/html5/rendering.html#phrasing-content-0 However, it is not because we are able to use IMHO, I think it should :) Why do you set the declaration twice in your modification? The last is enough. |
|
Hi @7studio, thanks for links. If we leave only last Also we can't write both rules in one selector: strong, b {
font-weight: inherit; /* will be ignored */
font-weight: bolder; /* will be applied and final result will be 900 instead expected 700 */
}That is why we need two separate declarations. |
|
Sorry Paul but in fact I couldn't understand what do you expect from this double declaration without Safari ;) Maybe you should link your Thank you for having point out this bug. |
|
☝️
I had tried with changes with font-weight of Chrome Variants
Firefox Variants
safari variants
OS: Windows 7 |
There was a problem hiding this comment.
Please improvize the comment as a fix for Safari (ver <6)
|
@necolas Buddy, please take a note of this comit..! |
|
Retested in latest browsers on Windows. I confirm that in:
solution works as expected without Early bug was observed in Chrome on Windows |
|
What is the last version of Safari that has this bug? |
|
Safari 7.0.4 (Mac) had this bug. |
|
This is a great idea because it respects the intent in the default styling of If no UA observes this behavior, and especially if they have moved away from this behavior, then the change would not be a true normalization. While I think it is an improvement, and Normalize contains some improvements, this at least needs to be considered. |
|
The current Firefox 43 release styles I also tested for the double-applied bolder bug in all current browsers as well as Safari 6.0.5 (Lion), Safari 6.2 (Mountain Lion) and Safari 7.1 (Mavericks) following the bug report and the provided test. Only Safari 6.0.5 (Lion) exhibited the issue. Setting You can test for the double-applied bolder bug here and test this solution yourself: strong {
font-weight: inherit;
}
strong {
font-weight: bolder;
}Be warned, a good minifier may destroy this necessary repetition. |
|
This has been merged. Thanks, @InterPaul! |
Improvement for fonts that have multiple weights.
If some block, for example header, is bold and has
stronginside we can makestrongbolder if font has additional weights.Check this demo.