// since 0.9.1
If you haven't tried LESS yet now is the time, you won't be disappointed. LESS is a dynamic stylesheet language
that extends CSS with dynamic behavior such as variable, mixins, operations and functions. Bootstrap itself is
written in LESS and comes with a wide variety of useful mixins, operations and functions that you can use in your
Alternatively you can use my <?php echo CHtml::link('LESS extension', 'http://www.yiiframework.com/extension/less'); ?>
- which uses <?php echo CHtml::link('
Agar\'s PHP LESS compiler', 'http s:// github.com/agar/less .php'); ?>.
+ which uses <?php echo CHtml::link('\'s PHP LESS compiler', 'http:///lessphp'); ?>.
When you have set up the LESS compiler of your choice create a <strong>less</strong> folder under your webroot
and create a <strong>styles.less</strong> file with the following content:
<?php echo $parser->safeTransform("~~~
// Import the Bootstrap mixins, operations and functions so that you can use them in this file.
// Your variables goes here ...
// Your mixins goes here ...
rules goes here ...
+// Your les goes here ...
That's it! The Typeahead is now bound to all elements with the class <strong>typehead</strong>.
There are similar methods for each plugin that can be used to register them from anywhere in your application.
- All these methods take two arguments, the CSS selector and options for the jQuery plugin.
+ All these methods take two arguments, the CSS selector and options for the jQuery plugin.