A spark for Codeigniter to enable easy usage of scss in your CI templates.
PHP
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
helpers
license.txt
readme.md
spark.info

readme.md

SCSS Spark

This Spark enables easy rendering & caching of scss files. This spark requires sass to be installed on the host machine.

Usage:

In your controller, simply load the spark:


class App extends CI_Controller {

	public function index()	{

		$this->load->spark('scss/[version]');
		$this->load->view('homepage');

	}

}

Then in you view:

<link rel="stylesheet" href="<?=scss('static/scss/layout.scss')?>" />

You can also get the render css as a string and do whatever you want with it:


class App extends CI_Controller {

	public function index()	{

		$this->load->spark('scss/[version]');
		$css = render_scss('static/scss/layout.scss');

	}

}