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

Use tabular numerals for phone numbers?

Open kennethormandy opened this issue 11 years ago • 2 comments

I realised it would be possible to use different numeral sets for phone numbers (and possibly other things) in certain context. For example, in a paragraph you might want a phone number with old-style numerals:

screen shot 2014-07-24 at 3 44 32

But in most other situations you’d probably prefer tabular numerals:

screen shot 2014-07-24 at 3 45 47

I’m undecided if this within the scope of this reset. Probably my biggest deterrent is that it would use a less-than-popular selector:

a[href^="tel:"] {
  font-feature-settings: "tnum" 1, "pnum" 1, "kern" 1; /* Etc. */
}

This particular feature might be better saved for a “Going beyond Normalize-OpenType.css” set of examples, which could include the features you need to have an opinion on to use, like stylistic sets. I’m pretty open to opinions on it.

kennethormandy avatar Jul 24 '14 22:07 kennethormandy

@kennethormandy As a sidebar on this, do you think it's worth while to move this out of the mindset of a normalize and into the mindset as a good set of OpenType defaults. I think potentially the notion of it normalizing is holding you back from making decisions like this one.

That said, I'm not sure you could say with any certainty which of these is the more common use case and I don't think you could write a selector that would make the right choice often enough to be worthwhile.

kpeatt avatar Jul 24 '14 22:07 kpeatt

I think you meant to have lnum rather than pnum in your example.

a[href^="tel:"], .p-tel {
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1; /* Etc. */
}

Zegnat avatar Sep 14 '14 12:09 Zegnat