使用现有样式表的应用程序的css框架 [英] css framework for an app with existing stylesheet
问题描述
我正在建立一个Chrome扩展程序,将一个小部件类型的东西附加到Gmail邮件。
I am building a chrome extension that attaches a widget sort of thing to gmail message. It appears below every email (something like a gmail contextual gadget) when the user is on gmail.com site.
我查看了几个css框架,例如twitter bootstrap,用于在gmail.com网站上使用的每个电子邮件(类似gmail上下文小工具)我的应用程序。当我在mywidget中使用它时,它混乱了现有的gmail风格,因为css类名称clash。有没有任何其他框架,我可以使用哪里会没有名称冲突?我遇到了jquery-ui框架。这里所有的类名都以.ui- *开头,因此没有名字冲突。
I looked at few css frameworks like twitter bootstrap to use in my app. When I used it in mywidget, it messed with the existing gmail styles because of css class name clash. Is there any other framework that I can use where there would be no name clash? I came across jquery-ui framework. All the classnames here start with .ui-* thereby causing no name clash. Are there any other css frameworks like this with unique class names?
推荐答案
更新2:这里是由@ GFoley83提供的v3.1.1的提示
Update:下面加入的pastebin是Twitter Bootstrap 版本2.0.4
Update: The pastebin joined below is the Twitter Bootstrap version 2.0.4
您应该明确使用最新版本,并自行编译。
You should definitively use the up-to-date version and compile it yourself.
Here is what I did with the bootstrap less files :
.tw-bs {
@import "less/bootstrap.less";
}
这是结果: http://pastebin.com/vXgRNDSZ
如果您不喜欢 tw-bs
容易做一个查找/替换,不应该有任何冲突。
If you don't like tw-bs
you can easily do a find/replace, there shouldn't be any conflict.
这篇关于使用现有样式表的应用程序的css框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!