Live data from Hacker News

Normalize.css v1.0.0

necolas.github.com

21–30 of 32 posts

Re: Normalize.css v1.0.0

#21
post #19
post #13

Earlier quoted context omitted.

I believe that all of the CSS in there is the default CSS in at least one browser. It really intends to only normalize between browsers.

Well the page says Improves usability with subtle improvements.

Good point. I think the only usability improvement is:

  button, html input[type="button"], input[type="reset"], input[type="submit"] {
    cursor: pointer;
  }
  button[disabled], input[disabled] {
    cursor: default;
  }

Re: Normalize.css v1.0.0

#22
post #2

Well, for beginners, this will kill the basic idea to remember necessary things, But hey.. good job!

I have to respectfully disagree here - this is like saying you shouldn't use jQuery, as it will kill the idea of remembering basic JavaScript. I'd rather just get shit done (tm) than spend time learning all the nuances of cross browser css.

I agree, plus remembering implementation nuances isn't the same as knowing a language.

Re: Normalize.css v1.0.0

#23

They make textarea display in sans-serif?[0] No thanks. rows and cols should mean something :( [0] https://github.com/necolas/normalize.css/blob/master/normali...

I don't see many textareas sized by row/col attributes anymore. Usually they're set to an explicit height and width.

Re: Normalize.css v1.0.0

#24
post #14
post #12

I'm kind of suspicious of these kinds of things. Especially the "subtle improvements" can have unintended effects. Can I really just include without worrying about it?

Please don't use this file. Use it for inspiration and take the parts that make sense for your website, but don't just copy the entire file without examining it closely. For example, this file disables the webkit text size adjustment on the iPhone. Text size adjustment is what makes most websites readable on the iPhone without excessive zooming / scrolling. You should disable it only if you are making a mobile optimi…

Incorrect:

  /*
   * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using    
   *    `em` units.    
   * 2. Prevents iOS text size adjust after orientation change, without disabling    
   *    user zoom.    
   */

  html {    
      font-size: 100%; /* 1 */    
      -webkit-text-size-adjust: 100%; /* 2 */    
      -ms-text-size-adjust: 100%; /* 2 */    
  }
Your statement would be true if it was setting -webkit-text-size-adjust:none, but 100% does as the comment says and only prevents resizing when changing orientations.

Re: Normalize.css v1.0.0

#25
post #12

I'm kind of suspicious of these kinds of things. Especially the "subtle improvements" can have unintended effects. Can I really just include without worrying about it?

No- in fact I'm sure the readme used to say "don't use this as a black box", instead use it as a starting point.

Re: Normalize.css v1.0.0

#26
I'm torn on this. There's a lot of code in here that most sites will never need. I hate bloat, especially on the frontend which is responsible for 90% of site speed. On the other hand, using this as your starting point for a new project will probably save you a fair amount of time. Perhaps start with this then rip out the stuff you don't end up using?

Re: Normalize.css v1.0.0

#27
post #24
post #14

Earlier quoted context omitted.

Please don't use this file. Use it for inspiration and take the parts that make sense for your website, but don't just copy the entire file without examining it closely. For example, this file disables the webkit text size adjustment on the iPhone. Text size adjustment is what makes most websites readable on the iPhone without excessive zooming / scrolling. You should disable it only if you are making a mobile optimi…

Incorrect: /* * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using * `em` units. * 2. Prevents iOS text size adjust after orientation change, without disabling * user zoom. */ html { font-size: 100%; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ -ms-text-size-adjust: 100%; /* 2 */ } Your statement would be true if it was setting -webkit-text-size-adjust:none, but 100% does as the comment s…

Did you test this? On my iPhone (iOS 5.1.1), the above css snippet disabled automatic text size adjustment.

If you have an iPhone, look at my test pages to see for yourself:

http://jabakobob.net/2012/08/hntest/test.html (without snippet)

http://jabakobob.net/2012/08/hntest/test2.html (with snippet)

For me, the first page renders with a much more legible text size.

Re: Normalize.css v1.0.0

#28
post #17
post #14

Earlier quoted context omitted.

Please don't use this file. Use it for inspiration and take the parts that make sense for your website, but don't just copy the entire file without examining it closely. For example, this file disables the webkit text size adjustment on the iPhone. Text size adjustment is what makes most websites readable on the iPhone without excessive zooming / scrolling. You should disable it only if you are making a mobile optimi…

> this file disables the webkit text size adjustment on the iPhone. No it doesn't.

Yes it does. See above.

Re: Normalize.css v1.0.0

#29

I'm torn on this. There's a lot of code in here that most sites will never need. I hate bloat, especially on the frontend which is responsible for 90% of site speed. On the other hand, using this as your starting point for a new project will probably save you a fair amount of time. Perhaps start with this then rip out the stuff you don't end up using?

> There's a lot of code in here that most sites will never need. [...] Perhaps start with this then rip out the stuff you don't end up using?

It’s designed to be used as a reference. i.e. if my website uses an element, I'll want to make sure I’ve ripped out those styles from normalize.css and placed them in my own CSS file. They will serve as a starting point. You should not be including the normalize.css directly on a page.

Personally, I prefer this kind of approach as opposed to a style reset. Style resets lose all visual information that originally came with the element. If a client wanted to use an but I didn’t style it in the first place it ends up looking like regular body text with no additional padding or margins. A normalise approach forgives me for my lack of forethought allowing an almost right for 90% of cases.

Re: Normalize.css v1.0.0

#30

They make textarea display in sans-serif?[0] No thanks. rows and cols should mean something :( [0] https://github.com/necolas/normalize.css/blob/master/normali...

Rows and columns became meaningless and outdated the moment browsers added those little grabbers in the corners.
Post reply on HN