开发者

Easy way to add experimental consistently css for multiple browsers?

I was w开发者_如何学Condering if there was a tool that can "pre-process" CSS and automatically add experimental properties so they'll look the same on browsers that support it. For example, instead of writing:

.class {
    -moz-border-radius: 8px;
    -webkit-border-radius: 8px;
    border-radius: 8px }

I could just write:

.class {
    border-radius: 8px }

And the others would be automatically added. For border radius it's not too bad, but it is for gradients. To accomplish the same result:

background: -moz-linear-gradient(top, #00abeb, #fff);
background: -webkit-gradient(linear, center top, center bottom, from(#00abeb), to(#fff));

LESS would be perfect if it had a feature like this. Does anyone know of a tool that does have this?


You could also try Compass. Compass has a CSS3 library premade :) (compass is just a mashup of blueprint framework and SASS)

http://compass-style.org/docs/reference/compass/css3/shared/


Sounds like the kind of thing that Sass should be able to do.


Looks like I have to read the documentation more carefully. LESS does indeed support this feature. (And it was on the front page!)

Here's a tutorial for the people looking at this question

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜