-
Notifications
You must be signed in to change notification settings - Fork 0
ehrenmurdick/css_writer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
CSS::Writer is for generating CSS from ruby code, similar in appearance to markaby. Example: require 'css_writer' writer = CSS::Writer.new writer.css do body do backgroundColor 'red' end div '.class' do fontWeight 'bold' end div do input do color '#eee' end end end writer.render Produces: body { background-color: red; } div.class { font-weight: bold; } div input { color: #eee; } You can also pass true into #render resulting in a cheap minification of the output css a la: writer.render(true) Resulting in: body{background-color:red;}div.class{font-weight:bold;}div input{color:#eee;}
About
CSS::Writer, write css using ruby syntax
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published