tags:

views:

1699

answers:

4

I'm currently using a modified CSS Cacheer as an alternative but its syntax is somewhat vague and adoption is, well, abysmally low... Documentation is hard to come by as well.

I'm looking to switch to SASS as it has a bigger user base than CSS Cacheer and better documentation. I am aware of phpHaml but it doesn't have support for SASS yet.

Any recommendation on a SASS parser for PHP? Preferably it should support SassScript.

+1  A: 

Not about Sass, so little OT: I found this project: CSScaffold very interesting and it seems to be PHP ready, just a heads up.

Adam Kiss
Seems like an updated version of CSS Cacheer. I guess that is how close we are going to get for now.
Andrew Moore
Thank you :] 15chrs
Adam Kiss
Yeah, I've been using CSScaffold too, although it looks like it is dead.
balupton
Actually, it's not dead. The author just deleted the old version, a new version is being worked on each weekend.
balupton
+7  A: 

Try this one: PhamlP

Lafriks
+9  A: 

Sass 3 (beta at the time of writing this) supports any language or framework. You can now run Sass independently in Watch mode.

CD to your project folder in your terminal and put Sass into Watch mode:

sass --watch sass:stylesheets

Sass will now listen to the sass files within the sass folder for changes. When a Sass file is saved, Sass will generate a new version of the corresponding CSS file in the stylesheets folder.

I highly suggest this route. The reason I suggest doing this versus PhamlP or any other language-specific port of Sass (specifically Sass, not Haml) is that you are able to work with current stable/beta/edge releases of Sass as you'd like. As new features become available in Sass (like the new SCSS superset syntax), you get access to them by upgrading your Haml/Sass gem, not waiting for the developer of your language-specific Sass interpreter to port the new version.

ltackett
Except it requires you do deploy Ruby to all your servers. That is definitely not an option for me.
Andrew Moore
no, only on your development environment. Sass renders the static CSS for you, you upload the static CSS. I can't find a compelling reason to compile Sass on-the-fly in production unless you're being fancy.
ltackett
A: 

Haven't tried it myself, but what about Turbine? http://turbine.peterkroener.de/index.php

Oliver
also, pHamlp supports SASS (http://code.google.com/p/phamlp/)
Oliver