2

I am using H5BP and I'm looking for a way to debug my CSS, however, W3C's CSS Validator returns errors for H5BP's normalize.css as well as main.css.

Is there something I can use to check for syntax errors that will validate normalize.css and main.css?

Also, what is the reason for not using the following line of code on normalize.css and main.css:

@charset "UTF-8";  

Thanks for the help!

UPDATE:

In the end, my question comes down to biting the bullet and either separating my CSS code from the boilerplate's or deleting things I may not need. This question helped me get there:

HTML5 Boilerplate, HTML5 Reset CSS validation

Community
  • 1
  • 1
Raphael Rafatpanah
  • 19,082
  • 25
  • 92
  • 158
  • Just a simple search on Google will show you some validators. This should help http://bit.ly/YQ5Thk – Cody Guldner Feb 11 '13 at 02:46
  • 1
    Do you know of one which will validate normalize.css? – Raphael Rafatpanah Feb 11 '13 at 03:10
  • Did you click on the link? – Cody Guldner Feb 11 '13 at 03:13
  • No need to be rude, friend. – Raphael Rafatpanah Feb 11 '13 at 03:49
  • 1
    I am not trying to be rude. I am sorry. But any of those validators will work. Try CSS lint. It has features you can turn off when validating – Cody Guldner Feb 11 '13 at 04:29
  • As for the charset, this should help http://stackoverflow.com/questions/2526033/why-specify-charset-utf-8-in-your-css-file – Cody Guldner Feb 11 '13 at 04:36
  • I do understand what the UTF-8 declaration accomplishes, however, I am wondering why, if anyone would know, the h5bp team has chosen to NOT include that when I am so used to including it. The reason I am asking this, is because I have a dozen "parsing" errors in my css. 90% of them come from the default normalize.css and main.css style sheets, however, the validator includes some of my code as parsing errors as well and I am wondering if I have a better way of detecting errors besides separating the styles I wrote and the default styles from the boilerplate. – Raphael Rafatpanah Feb 11 '13 at 04:43
  • Also, the UTF-8 declaration does not fix the problem. Do you know what a parsing error is? I've searched forever trying to find out how I would be able to fix an issue, all of which pointed me to the UTF-8 declaration, however, like I pointed out above, it was not solved. – Raphael Rafatpanah Feb 11 '13 at 04:44
  • But, I guess my question was answered through here: http://stackoverflow.com/questions/6624808/html5-boilerplate-html5-reset-css-validation?rq=1 – Raphael Rafatpanah Feb 11 '13 at 04:49
  • You should put that information in your questions – Cody Guldner Feb 11 '13 at 04:50
  • Why don't you post your thoughts in an answer below and I'll give you credit for your help. Thank you. – Raphael Rafatpanah Feb 11 '13 at 04:50

2 Answers2

2

A good tool that I have used in the past is CSS Lint. It is a very good validation tool, as there are different errors and warnings that you can turn off and on. There is also one for javascript, called JS Lint.

As for the charset part, if you want to know what it is used for, then this question has been answered here
Why specify @charset "UTF-8"; in your CSS file?
Hope this helps you.

Community
  • 1
  • 1
Cody Guldner
  • 2,888
  • 1
  • 25
  • 36
0

UPDATE:

In the end, my question comes down to biting the bullet and either separating my CSS code from the boilerplate's or deleting things I may not need. This question helped me get there:

HTML5 Boilerplate, HTML5 Reset CSS validation

Community
  • 1
  • 1
Raphael Rafatpanah
  • 19,082
  • 25
  • 92
  • 158