TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Normalize.css: An alternative to CSS resets

173 pointsby necolasalmost 14 years ago

13 comments

jsdaltonalmost 14 years ago
Philosophically, I think I prefer this approach to resetting everything.<p>I'm not sure, however, I'm on board with the idea that you tweak this for every project you work. That would make merging future evolutions of these styles (e.g. when new browser versions are released) a real pain.<p>It's also a bit disconcerting that the project authors went their separate ways and there are now two projects? Hm.
评论 #2633782 未加载
andrejpavlovicalmost 14 years ago
I think a combination of CSS reset[1] and CSS base[2] is the best way to go. Use CSS reset to remove all styles, and then use a standard CSS base to set a new set of defaults. That way you can easily distinguish between what styles are used for resetting, and which are actually meant for styling.<p>YUI does a really good job with this.<p>[1]<a href="http://developer.yahoo.com/yui/3/cssreset/" rel="nofollow">http://developer.yahoo.com/yui/3/cssreset/</a> [2]<a href="http://developer.yahoo.com/yui/3/cssbase/" rel="nofollow">http://developer.yahoo.com/yui/3/cssbase/</a>
ez77almost 14 years ago
Random question: I was looking at [1], linked by Normalize. How come the element HTML element "A" has no default values? It sure seems to always be blue/purple and underlined...<p>Thanks in advance.<p>[1] <a href="http://css-class.com/test/css/defaults/UA-style-sheet-defaults.htm" rel="nofollow">http://css-class.com/test/css/defaults/UA-style-sheet-defaul...</a>
astrofinchalmost 14 years ago
"The normalize.css file is not intended to be a mysterious "black box" that is included in a project and then ignored."<p>Is there anything that is? I think I'd prefer to use that, if it existed.
评论 #2634086 未加载
评论 #2635030 未加载
brian_calmost 14 years ago
Why? Write your CSS. Test it in browsers. If something doesn't look right, fix it. Resets are bloat.
评论 #2633973 未加载
评论 #2633786 未加载
评论 #2633834 未加载
评论 #2633976 未加载
评论 #2633793 未加载
评论 #2635345 未加载
dylanrwalmost 14 years ago
Awesome approach. Whenever I start out a project, I always reset, then normalize it back up to a common standard, then apply the additional style. It's good to accelerate the first two steps with this.
MatthewPhillipsalmost 14 years ago
Can anyone explain how this differs at all from resets? The only difference I see on the page is:<p>&#62; Preserves useful defaults<p>and I don't know what a "user default" is.
评论 #2633921 未加载
评论 #2633714 未加载
评论 #2633716 未加载
评论 #2633807 未加载
评论 #2634006 未加载
评论 #2633702 未加载
kilianalmost 14 years ago
This is very similar to what I've been doing since 2008 with <a href="http://sencss.kilianvalkhof.com" rel="nofollow">http://sencss.kilianvalkhof.com</a>, except I also provide a good vertical rhythmn. I should probably start promoting it more again ;)<p>That said, the form stuff in normalise.css takes a very different approach that I'm definitely gonna try out.
tcdentalmost 14 years ago
They've taken some liberties in correcting (arguable) flaws in standard stylesheets, ex. setting cursor:pointer on form buttons, but I like all that they've chosen to include. Never been a fan of full reset stylesheets, but there's a really good chance I'll take advantage of this, and the research they put in, for future projects.
SkyMarshalalmost 14 years ago
Any particular reason you linked to your fork instead of the original?
arapidhsalmost 14 years ago
I like that it preserves some normals but either way almost always there will be some overrides so staying with reset.
评论 #2634856 未加载
username3almost 14 years ago
&#62; Chrome, Firefox 3+, Safari 4+, Opera 10+, Internet Explorer 6+<p>No version for Chrome?
评论 #2634156 未加载
评论 #2634983 未加载
ck2almost 14 years ago
Looks nice and clean but is github needed for a 3k text file?<p>(plain text) <a href="https://raw.github.com/necolas/normalize.css/master/normalize.css" rel="nofollow">https://raw.github.com/necolas/normalize.css/master/normaliz...</a>
评论 #2633823 未加载
评论 #2636564 未加载
评论 #2634022 未加载