From: John-John Tedro Date: 2011-08-13T04:29:47+09:00 Subject: [ANN] RubyCSS --001636ed7178ab289404aa53ee70 Content-Type: text/plain; charset=ISO-8859-1 Hello List! I've been hacking at an interesting experiment using mxied in class functions to build and generate css. The result is RubyCSS, which takes something like the following and turns it into compact CSS. require 'rubycss' class Test include RubyCSS::StyleSheet abstract :text_base do color c(:red) end select ".test" do extends :text_base margin 12 end end puts Test.compile => .test {color: #ff0000; margin: 12px;} If you feel like taking it for a spin, it can be found at http://github.com/udoprog/rubycss/ My goal is to stick to vanilla Ruby, and I've found it very a nice match for complex style sheets. Some of my goals involve: - Better color arithmetics - Add more aliased and expanding css rule (like border-radius => -moz-border-radius, -webkit-border-radius and border-radius) - Define sensible default stylesheet rules, like sets of fonts or grid layouts. - Better and configurable implicit conversions (like 12 -> "12px"). I hope you find it useful! -- John-John Tedro --001636ed7178ab289404aa53ee70--