There's a lot of interesting stuff going on at https://github.com/h5bp/html5-boilerplate/blob/master/css/style.css
Using this would be a nice way to join forces from different communities.

Would you be interested in a patch for this?

CommentFileSizeAuthor
#11 sassify-normalize-1372040-11.patch2.19 KBechoz

Comments

echoz’s picture

Is this a duplicate of #1295296: Add HTML5 display definitions from D8 and normalize.css ? Not marking as dupe yet, but asking... is there anything else Zen doesn't already cover beyond what we added here? As I posted, "and perhaps other smart stuff", noting normalize.css and html5boilerplate using it. I also am delighted with Drupal devs on the same page with the dev community at large.

maartenverbaarschot’s picture

I was thinking more along the lines of taking normalize.css to replace html-reset.css, tweaking it specifically for Drupal, and then check if there's any stuff left from the current html-reset that needs to stay.

I like how normalize.css focuses on just providing a good starting point with consistent browser defaults, with almost zero presentational bulk since most people want to write those themselves anyway.

Also, using work "as is" from the H5BP community would allow us to focus more on the Drupal side of things :)

echoz’s picture

I was thinking similarly when I proposed the referenced issue, as I do really like normalize.css and how html5boilerplate adapted it. As I compared, it seemed the HTML5 display definitions were the significant part lacking in zen, and like you, proposed it without a patch to see how John wanted to integrate it. It just flowed into what D8 had done. Let’s see what John thinks.

johnalbin’s picture

Title: Consider normalize.css as a basis for a new and improved html-reset.css » Use normalize.css as a basis for a new and improved html-reset.css
Component: CSS/HTML markup » CSS/SASS/HTML markup

I like it!

Let's do this now!

KrisBulman’s picture

wicked, glad to see this happening.

johnalbin’s picture

I converted normalize to SCSS over in https://github.com/JohnAlbin/normalize.css if anyone wants to use that as a basis for a patch.

johnalbin’s picture

On second though, I just went and added normalize.scss to zen/STARTERKIT/sass/. I haven't linked it in via the .info file and it still needs to be merged with html-elements.scss. But that should make the patch easier to make.

johnalbin’s picture

Priority: Normal » Major
johnalbin’s picture

I now have a "drupalized" normalize over at https://github.com/JohnAlbin/normalize.css/tree/drupal-normalize

Updated Zen to use that.

KrisBulman’s picture

I suggest we remove the star hacks in this file for targetting ie6-7 with:

example:

before

legend {
  border: 0; // 1
  padding: 0;
  white-space: normal; // 2
  *margin-left: -7px; // 3  // LTR
}

after:

legend {
  border: 0; // 1
  padding: 0;
  white-space: normal; // 2
  .ie6-7 & { margin-left: -7px; } // 3  // LTR
}

output:

legend {
  border: 0; 
  padding: 0;
  white-space: normal;
}

.ie6-7 legend { 
  margin-left: -7px;
}
echoz’s picture

Status: Active » Needs review
StatusFileSize
new2.19 KB

Another step towards using normalize.css, this further readies normalize.scss replacing hacks with ie conditional classes. @KrisBulman, thanks for the nudge, as I was already working on this. The patch caught one trailing whitespace also.

johnalbin’s picture

Status: Needs review » Needs work

I completed porting normalize to Compass over at https://github.com/JohnAlbin/normalize.css-with-sass-or-compass

And then completed porting it to Drupal over at http://drupal.org/project/normalize

Elly, I committed your patch to a feature branch, 1372040-normalize. I need to think about that one. It bumps up the specificity on html elements in IE.

Now I just need to merge html-elements into normalize on the plane. Leaving for Drupalcon in an hour.

johnalbin’s picture

Status: Needs work » Fixed

Elly, I committed your patch to a feature branch, 1372040-normalize. I need to think about that one. It bumps up the specificity on html elements in IE.

In the end, I decided to keep the star hacks because it is what is in the Normalize with Compass project. It will make maintenance a little easier. As well as keep the specificity lower.

I've finished merging in all the html-elements stuff into normalize.

Fixed. http://drupalcode.org/project/zen.git/commitdiff/6451c0a

johnalbin’s picture

I should note that our normalize doesn't contain empty rulesets for every HTML5 element like our old html-elements did. That decision follows along with what the standard normailze does. Though, I made an exception to have empty rulesets for links since the ordering of the link pseudo-selectors is important.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.