Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

业务子组件库共用CSS如何处理? #43

Open
limu opened this issue Dec 6, 2012 · 1 comment
Open

业务子组件库共用CSS如何处理? #43

limu opened this issue Dec 6, 2012 · 1 comment
Labels

Comments

@limu
Copy link
Member

limu commented Dec 6, 2012

直通车重构的系列组件有一些公用的CSS,内容比较简单.比如:

.fl{float:left;display:inline;}
.fr{float:right;display:inline;}
.mt15{margin-top:15px;}
.mb15{margin-bottom:15px;}
.ml15{margin-left:15px;}
.tl{text-align:left;}
.tr{text-align:right;}
.tc{text-align:center;}
.none{display:none;}

我们希望每个组件可以单独共享,那这类css如何做共享?冲突如何处理?写法是否该有些约定?

@xthsky
Copy link
Member

xthsky commented Dec 6, 2012

个人想到最好的解决方案是开发时利用 less 的 import 共享,这样组件发布时是独立的,页面组装时利用一些css优化工具可以去重

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants