如何正确地将 HTML5 Boilerplate 与 Twitter Bootstrap 集成?
在我的 Play 2.0 项目中,我已经集成了 Bootstrap(因为文件较少,Play 可以即时编译它们),但现在我找到了 Boilerplate,我认为使用它也是一个好主意。
经过一番谷歌搜索后我发现了这个: http://www .quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa
所以,看起来集成应该是可能的,并且有甚至有两个项目试图做到这一点。唯一的问题是他们做完全不同的事情,我不确定哪一个是正确的。
当前状态下的 https://gist.github.com/1422879 似乎只是忽略 样式来自 Boilerplate 的 .css
文件。它已重命名为 h5bp.css
,但我没有看到 h5bp.css
包含在任何地方。
https://github.com/elgreg/html5-boilerstrap 另一方面使用它们,只需将 styles.css 文件分成两部分(h5bp_normalize.css
和 styles.css
,bootstrap.css
包含在它们之间)。但是这样Boilerplate和Bootstrap之间不会有冲突吗?
所以我有点失落。在这种情况下,正确的做法是什么?
In my Play 2.0 project I already have Bootstrap integrated (as the less files, Play can compile them in the fly) but now I found Boilerplate and I think it would be a nice idea to make use of it also.
After a bit of googling I found this:
http://www.quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa
So, looks like integration should be possible, and there are even 2 projects which try to do that. The only problem is that they do completely different things and I'm not sure which one is correct.
https://gist.github.com/1422879 in its current state seems to just ignore styles.css
file coming from Boilerplate. It's renamed to h5bp.css
, but I don't see h5bp.css
included anywhere.
https://github.com/elgreg/html5-boilerstrap on the other hand uses both of them, just splitting styles.css file into two parts (h5bp_normalize.css
and styles.css
, bootstrap.css
is included between them). But aren't there any conflicts between Boilerplate and Bootstrap this way?
So I'm a bit lost. What is the proper way of doing things in this case?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需使用Initializr,它是半官方的解决方案,它也有大量的选项。开箱即用支持 Bootstrap + H5BP!
http://www.initializr.com/
Just use Initializr, it's the semi-official solution and it has a huge set of options too. Bootstrap + H5BP is supported out of box!
http://www.initializr.com/
我已经从 twitter bootstrap 中删除了重置样式(通过删除 less
@import
语句)并将其粘贴到 html5-boilerplate(在用户样式部分)中。工作得很好。I've removed reset styles from twitter bootstrap(by removing less
@import
statement) and pasted it into html5-boilerplate(in user styles section). Worked fine.Gist https://gist.github.com/1422879 是 H5BP + twitter bootstrap 集成< /罢工>the Gist https://gist.github.com/1422879 is H5BP + twitter bootstrap integration