GithubHelp home page GithubHelp logo

cynazem / scaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from im-richard/scaffold

0.0 2.0 0.0 1.96 MB

Extend, combine and compress CSS - I've stopped working on this project, if anyone would like to take over let me know

Home Page: http://github.com/anthonyshort/Scaffold/wiki

scaffold's Introduction

Scaffold is a 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.

Out of the box, you get:

  • Nested Selectors
  • Variables
  • Minify/YUI/CSSTidy compression
  • Automatically parse files through SASS.
  • Combining of files
  • Data URI embedding of images/fonts
  • Custom CSS functions like random() and hsla()
  • Custom CSS properties like image-replace:url();
  • Variables powered by XML
  • Mixins

All of this is backed by a strong file cache, so 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|Automatically parsing files with a .htaccess file]].

If the file has changed, Scaffold will recache the file, otherwise it will just fetch the processed file from the cache and return that.

Requirements

  • PHP 5.2

Setup

Download the latest version and place the scaffold/ folder somewhere on your webserver.

The 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|Configuration]] for Scaffold.

Now in your HTML reference CSS files by going through the parse.php file:

<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 parse.php.

Documentation

See the wiki for more detailed documentation.

License

Copyright © 2010 Anthony Short

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. No attribution is required by products that make use of this software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.

Contributors to this project agree to grant all rights to the copyright holder of the primary product. Attribution is maintained in the source control history of the product.

scaffold's People

Contributors

balupton avatar pdclark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.