Skip to content

Instantly share code, notes, and snippets.

@ZeeAgency
Created January 13, 2011 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZeeAgency/777518 to your computer and use it in GitHub Desktop.
Save ZeeAgency/777518 to your computer and use it in GitHub Desktop.
<?php
header('Content-type: text/css');
include('../PHamlP_3/sass/SassParser.php');
$sass = new SassParser(array(
'vendor_properties'=> array(
'appearance' => array('-moz-appearance', '-webkit-appearance'),
'border-radius' => array('-moz-border-radius','-webkit-border-radius'),
'box-shadow' => array('-moz-box-shadow', '-webkit-box-shadow'),
'box-sizing' => array('-moz-box-sizing', '-webkit-box-sizing'),
'column-count' => array('-moz-column-count', '-webkit-column-count'),
'column-width' => array('-moz-column-width', '-webkit-column-width'),
'column-gap' => array('-moz-column-gap', '-webkit-column-gap'),
'column-rule' => array('-moz-column-rule', '-webkit-column-rule'),
'transform' => array('-moz-transform', '-webkit-transform', '-o-transform', '-ms-transform'),
'transition' => array('-moz-transition', '-webkit-transition', '-o-transition')
),
'syntax'=>'scss'
));
$newStylesheet = $sass->toCss($_GET['s']);
echo $newStylesheet;
// Write the new static stylesheet
$newFile = @fopen(str_replace('.scss', '.css', $_GET['s']), 'w');
@fwrite($newFile, $newStylesheet);
@fclose($newFile);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment