Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
CSS pre-processor built in PHP that allows developers to easily create custom extensions to CSS and reduce the amount of time they spend writing code.Scaffold is a
Out of the box, you get:
- Nested Selectors
- Minify/YUI/CSSTidy compression
- Automatically parse files through SASS.
- Combining of files
- Data URI embedding of images/fonts
- Custom CSS functions like
- Custom CSS properties like
- Variables powered by XML
With a complete cache system included; you don’t need to worry about the hit to the server. In addition, Scaffold will serve your CSS to the browser with the correct caching headers.
- Gzip components
- Sets a far-future expires header
- Configures ETags
How it works
Requests to CSS files are made through Scaffold:
<link href="scaffold/parse.php?file=/stylesheets/master.css" rel="stylesheet"/>
You need to tell
parse.php the location of a CSS file, and it will do all the work for you. Alternatively, you can use a .htaccess file automatically parse CSS files in a directory.
If the file has changed, Scaffold will recache the file, otherwise it will just fetch the processed file from the cache and return that.
- PHP 5.2
Download the latest version and place the scaffold/ folder somewhere on your webserver.
parse.php file needs to be accessible to the web, so either put the scaffold folder in your web directory, or move parse.php and change the
$system variable inside this file to point to the scaffold directory.
parse.php contains the configuration options for Scaffold.
Now in your HTML reference CSS files by going through the
<link href="path/to/parse.php?file=/path/to/stylesheet.css" rel="stylesheet"/>
The file parameter can point to the CSS file using either an absolute path, a path relative to parse.php or you can add your stylesheet directory to the
load_paths array in
- How Extensions Work
- Creating Extensions
- Creating your own CSS properties
- Creating your own CSS functions