normalize.css icon indicating copy to clipboard operation
normalize.css copied to clipboard

May I suggest updating abbr[title] to add support for Safari?

Open simevidas opened this issue 4 years ago • 5 comments

normalize.css includes the following style rule:

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

Source: https://github.com/necolas/normalize.css/blob/master/normalize.css#L80-L89

This results in a solid underline in Safari:

Screen Shot 2020-06-02 at 6 29 52 PM

However, Safari does support text-decoration-style. You could add the following declaration to the above style rule to make the underline dotted in Safari as well:

text-decoration-style: dotted;

Demo: https://jsbin.com/guriqel/edit?html,css,output

Could you check if this is something that you could do?

simevidas avatar Jun 02 '20 16:06 simevidas

#738

juytter avatar Jul 03 '20 14:07 juytter

I'm not sure that there is anything that can be done for this as far as normalize.css goes but thought it might be noteworthy.

I noticed some oddness with the dotted underline in chrome with a three letter acronym. At first i thought it was just because the content was all caps but no. Changing the font-size can change/improve the appearance of the dotted underline IMO, at around font-size:21px the dotted underline looks better in chrome here. Using 5 letters saw unexpected results in chrome here as well. https://codepen.io/sean1138/pen/dyGeKK 2020 07 09_071853

sean1138 avatar Jul 09 '20 11:07 sean1138

@simevidas is this fix still needed in Safari?

garrettw avatar Feb 15 '23 18:02 garrettw

@garrettw Yes, it’s needed. Safari 16.3 still does not support the shorthand text-decoration: underline dotted.

The relevant WebKit bug is here: https://bugs.webkit.org/show_bug.cgi?id=230083

simevidas avatar Feb 15 '23 18:02 simevidas

Ok, adding it to my normalize in https://github.com/garrettw/vitals

garrettw avatar Feb 15 '23 20:02 garrettw