3 ms·
This link is for the less-well-known normalize.css, https://github.com/csstools/normalize.css https://github.com/csstools/normalize.css. It was last touched fiv
by chrismorgan 1y ago
This link is for the less-well-known normalize.css, https://github.com/csstools/normalize.css https://github.com/csstools/normalize.css. It was last touched five years ago.
The better-known normalize.css is https://github.com/necolas/normalize.css https://github.com/necolas/normalize.css. It was last touched seven years ago.
There’s a reason neither has seen more recent activity: they were mostly about making old browsers behave themselves, and they’re done. The stylesheets did have a little more to them, but it wasn’t what people actually cared about… and in some cases they were better off without them. I know I disagree with quite a few of their opinionated styles.
Those old browsers are now long obsolete—half of them can’t even talk TLS 1.2, which basically excludes them from the modern web—so almost all of these stylesheets is obsolete, and you don’t need them.
For the few pieces that might still have value, you would now prefer to use @layer or :where() for this kind of stylesheet, to make them behave more like user agent styles and avoid specificity conflicts.
- rhdunn 1y agoTo add to this, HTML 5/LS have a section on rendering HTML elements [1]. That section provides default CSS rules that a conforming web browser must use. Therefore, modern browsers effectively have built-in normalize.css rules, providing a consistent web page default. There may be some rules you want to change in a set of baseline rules such as margin/padding, image sizing, and fonts. But those would be things you would add on top of normalize.css anyway. [1] https://html.spec.whatwg.org/multipage/rendering.html#rendering https://html.spec.whatwg.org/multipage/rendering.html#render...
- extra88 1y agoYour link makes it very clear that those CSS rules are not required, that they are suggestions. However, all major browsers do use them.
- assimpleaspossi 1y agoIn the nearly 25 years of running a web dev company, we never used such resets because it always felt like browsers had their built in settings, then one would have a reset to shift everything around one way, then we'd have settings to throw things another way and that's how it felt--like we were slamming things back and forth far too much. Instead, we'd just set elements to what we wanted them to be which is what we'd have to do in most cases anyway, making any reset unnecessary.
- chrismorgan 1y agoThis isn’t a reset, it’s normalising different browsers. There’s a pretty big difference between the two.
- assimpleaspossi 1y agoMy point remains the same. And I'm not sure there is a difference between a reset and a normalizer.
- Defletter 1y agoPresumably, a reset is resetting to a browser's defaults, whereas a normaliser is about establishing a cross-browser default. I haven't done much web-dev in recent years, but I vividly remember the same page looking different in different browsers, particularly prior to HTML5.
- Octoth0rpe 1y ago> a reset is resetting to a browser's defaults No, a browser's defaults are, well, its defaults. One doesn't reset to them. I think the line between a normalizer and reset stylesheet is _very_ fine, if there even is a line. A normalizer is probably _slightly_ more opinionated than a reset stylesheet. In the end, the difference isn't really important. If you need a reset stylesheet, normalizer will probably do just as well.
- efilife 1y agoThe line is not fine. Resets don't apply any styling, normalizers do. Normalizers keep the overall styling, like the margins of paragraphs and set them to an arbitrary value so all browsers will act the same. A reset is usually just: * { all: unset; }
- assimpleaspossi 1y agoNone of that matters. Just set the properties you want the element you are using to what you want it to be. No need to think about any other elements except the ones you use and, when you set a property, it will be the same across all browsers. No need to give it a name or import it into your style sheet. No thinking involved at all outside of your normal design method. No need to investigate the latest trends or activities by some online guy. Just do what you do.