Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Boilerplate, HTML5 Reset CSS validation

I'm in the process of selecting an HTML5 template for my web projects. I've been using HTML5 Initiliazr which uses Boilerplate for the last few months but decide to reevaluate the two templates, since I don't like the issues with HTML5 Boilerplate's CSS not being valid against W3 CSS validator (CSS3).

Now my question is, given the fact that both CSS resets also take into account vendor quirknesses, will those resets ever be completely valid or is it impossible to assume such a thing?

I did noticed that HTML5 Reset actually has a few issues less than Boilerplate but that might change in the future. However, I did read Boilerplate's explanation on why each and every style was introduced and what problems it solves, so it kinda makes sense.

So what do you think?

like image 968
mare Avatar asked Jul 08 '11 13:07

mare


People also ask

What does html5 Reset do?

The reset input type creates a button that resets the form to the default values. If the value attribute is present, the value of that attribute will be the text on the button. If not, the default wording on the reset button is “Reset”. The reset button brings the form back to it's initial, default state.

How do I reset CSS styles?

Answer: Use the CSS all Property You can simply use the CSS all property with the value revert to remove the additional author-defined CSS styling for an element (i.e. reset to browser's default CSS styling).

What is the best CSS reset?

Normalize. CSS has been the most popular CSS reset library for years. It saves you a lot of time matching a duplicate experience for each web browser.


1 Answers

Boilerplate's css uses few hacks like * (*font-size:small;) and some browser specific css rules - if you are really concerned about validation just move the hacky rules out of the main style.css and load them for the browser that needs them only.

You can be either hacky and crossbrowser or valid and degraded. And don't forget that boilerplate also states:

Think there's too much? The HTML5 Boilerplate is delete-key friendly. :)

But if you ask me - its waste of time trying to pass the css validation and still be crossbrowser compatible - if your client demands it and has extra money to pay for the css valid badge (which probably won't generate them any extra income) than go for it, if you personaly are obsessed by having to pass it go for it - otherwise it's nonsense and waste of your time. If you wrote all of the valid css3 rules correctly and used a few vendor specific rules it won't really kill anyone.

Overall Boilerplate is a solid template and perfectly ok to use for every day projects and the problems you are exposing are more of a perfectionist's view on the thing. This would be my 2 cents on this.

like image 135
easwee Avatar answered Oct 09 '22 16:10

easwee