ecomfe / est

EFE Styling Toolkit based on Less
http://ecomfe.github.io/est
MIT License
397 stars 70 forks source link

支持padding、margin之类的font-size-rem和font-size-em #10

Closed otakustay closed 11 years ago

otakustay commented 11 years ago

能不能提供支持paddingmargin之类的,可提供1-4个px值的.font-size-rem.font-size-em

目测.font-size-em因为有1个额外参数,因此事实上可能是1-5个参数,且1-4个的时候是有歧义的,比较麻烦。但是感觉这个更重要,不少业务系统是固定一个字体大小的,也就是用rem和用em在大部分情况下等效,为了最好的兼容性会追求em

zmmbreeze commented 11 years ago

参数可以是1-2个,和简写方式类似。比如.margin-rem(10px 12px).margin-em(10px 13px 0 0, 16px)的形式。

新增的这几个函数再放在typographic里面可能有些不合适了,放在layout里面?@Justineo 怎么看?

Justineo commented 11 years ago

感觉算不上 layout,可以放在 util 里面吧?

zmmbreeze commented 11 years ago

放util里面可以

Justineo commented 11 years ago

另外,我觉得还可以单独提供 .margin-*-rem().margin-*-em(),与 margin 属性本身可以保持一致。

zmmbreeze commented 11 years ago

嗯,本来就打算加

Justineo commented 11 years ago

已在 9a785a62024a31c564194f45514e368556e263e9 中添加。