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

Why set font family?

Open Sky161 opened this issue 9 years ago • 6 comments

https://github.com/necolas/normalize.css/blob/73b6b0c7e8690ab5005bca9d7e13d3fb319c98ac/normalize.css#L245

Why did you do this? This added a headache! I have a custom font in the project and I had to redistribute the entire block ... It's not cool!

Sky161 avatar Aug 18 '17 08:08 Sky161

Agreed, this is not necessary. Why just not to make Class with family standard and just implement it on body page.

Fargard avatar Aug 18 '17 08:08 Fargard

You have to set font-family for inputs in any case, font-family for <body> doesn't affect inputs. You could look at http://www.cssdesk.com/V2Zam that proves it.

I tested it on Firefox 55.0 and Chromium 59.0.3071.104.

unclechu avatar Aug 18 '17 08:08 unclechu

@unclechu true, but why define sans-serif instead of this?

input {
  font-family: inherit;
}

before this change you could define font-family on html/body and be done with it. Now you'd have to define it for more (which exactly?) elements.

oskarrough avatar Sep 06 '17 10:09 oskarrough

@oskarrough

you could define font-family on html/body and be done with it

No you couldn't. This is my point.

unclechu avatar Sep 06 '17 17:09 unclechu

@unclechu but if we use inherit instead of sans-serif as @oskarrough suggested we would not have to do redeclare later on in our project.

Example: https://jsfiddle.net/9vcdta90/

hatzipanis avatar Sep 08 '17 07:09 hatzipanis

It's now inherit

necolas avatar Feb 08 '18 23:02 necolas