HTML5 Boilerplate,HTML5重置CSS验证 [英] HTML5 Boilerplate, HTML5 Reset CSS validation

查看:211
本文介绍了HTML5 Boilerplate,HTML5重置CSS验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的网络项目选择HTML5模板。我已经使用HTML5 Initiliazr在过去几个月使用Boilerplate,但决定重新评估这两个模板,因为我不喜欢HTML5 Boilerplate的CSS的问题不能有效的W3 ​​CSS验证器(CSS3)。

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).

现在我的问题是,考虑到这两个CSS重置也考虑了供应商的quirknesses,这些重置将是完全有效的,还是不可能假设这样的事情?

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?

我注意到HTML5重置实际上有一些比Boilerplate更少的问题,但是将来可能会改变。然而,我读过Boilerplate的解释,为什么每一个风格被介绍和它解决了什么问题,所以它有点有意义。

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.

那么你认为什么? p>

So what do you think?

推荐答案

Boilerplate的css使用几个像*(* font-size:small;)和一些浏览器特定的CSS规则 - 如果你真的关心验证只是移动主要style.css的黑客规则和加载它们只需要它们的浏览器。

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:


认为有太多? HTML5
Boilerplate是删除键友好的。 :)

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

但是如果你问我 - 浪费时间试图通过css验证并且仍然是crossbrowser兼容 - 要求它和有额外的钱支付css有效的徽章(这可能不会产生他们任何额外的收入)比去,如果你personaly痴迷的不得不通过它去 - 否则它的废话和浪费你的时间。如果你正确地写了所有有效的css3规则,并使用一些供应商特定的规则,它不会真正杀死任何人。

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.

总体锅炉是一个坚实的模板,完全确定使用每天的项目和你所暴露的问题更多是一个完美主义者对事物的看法。这是我的2分钱。

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.

这篇关于HTML5 Boilerplate,HTML5重置CSS验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆