Skip to content

Instantly share code, notes, and snippets.



Created Sep 2, 2009
What would you like to do?
css2sass, but in the browser. Perfect for copy/pasting little snippets.
Try it like:
> curl | ruby
Actually... damn that doesn't work. :( I'll figure it out later.
require 'sinatra'
require 'haml'
require 'sass/css'
get '/' do
haml :index
post '/' do
@sass =[:css]).render
haml "%pre= @sass"
@@ layout
%title Sassy!
= yield
@@ index
%form(action="/" method="POST")
%textarea(name="css" cols="80" rows="50") /* Paste some CSS here to convert to SASS */
%input(type="submit" value="Sass-ify!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment