Andy-set-studio / modern-css-reset

A bare-bones CSS reset for modern web development.

Home Page:https://hankchizljaw.com/wrote/a-modern-css-reset/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It's normalize or it's reset?

Grawl opened this issue · comments

Hello! It's perfect idea to store so much good practices in a single CSS file available from NPM.

But some styles can cause a problems.

1. I do not want to use all images as block. Sometimes I want to inline an image, and browser default is inline.

/* Make images easier to work with */
img {
  max-width: 100%;
  display: block;
}

I suggest to remove display: block from here.

2. I do not always want to get some margins somewhere in article.

I can use this tag for very custom design, and top margin on each child is not what I want. If I want vertical margins between elements, I use <h1> and <p>.

/* Natural flow and rhythm in articles by default */
article > * + * {
  margin-top: 1em;
}

I suggest to remove this part.


All other code is amazing, I want to use it on every website I make.

Hey there, both these styles are very handy in the work I do (remember this is a reset that I created and just made public), so I'll keep them in.

Cheers for the kind words!

Ok so I prefer to fork it 🤞

Yeh for sure. That’ll be an ideal approach 🙂

I wanted to add an issue about 1. and 2. Found this first. I think those should be removed. But everyone is entitled to their opinion.

That kind of issues have a simple solution. Split stylesheet onto two:

  1. reset stylesheet, where falls rules about absolutely everyone can tell it is a reset
  2. everything else, normalizing stuff

So, package's author can still use it as intended, as well as everyone who agree with his decisions, by including both stylesheets sequentialy. Reset guys would use just 1st reset stylesheet. Besides that, additional benefit, if you use both tables and ocasionally face an visual glitch, you can turn off 2nd normalizing stylesheet and factor out is it was a cause of the glitch issue.