Download the PHP package kss-php/bridge-bundle without Composer
On this page you can find all versions of the php package kss-php/bridge-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kss-php/bridge-bundle
More information about kss-php/bridge-bundle
Files in kss-php/bridge-bundle
Package bridge-bundle
Short Description A Symfony2 implementation of KSS: a methodology for documenting CSS and generating styleguides
License MIT
Informations about the package bridge-bundle
KssBridgeBundle
This bundle provides a simple integration of the kss-php library into Symfony2. KSS is a methodology for documenting CSS and generating styleguides. You can find more information about KSS here at http://warpspire.com/kss/.
Installation
The easiest way to install this bundle is through composer. In your Symfony2 project folder, type the following command:
$ composer require kss/bridge-bundle
This will install the bundle and all dependencies needed for the bundle to work.
Next, you will need to enable the bundle by adding it to your Kernel:
Finally, if you'd like try out the example provided in the bundle, you'll need to add the following to your symfony2 routes.
Basic Usage
To output the dynamically generated styleguides, you'll need to create a \Kss\Parser in your controller and pass it the directory containing your stylesheets.
Then in your views, when you want to output a styleguide section, use the following twig include:
Finally, you'll need to include a small JavaScript file to help rendering of pseudo-classes such as :hover, :disabled, etc. in the styleguide. This can be done with the following lines somewhere in your layout or view:
If you would like, you can either create your own styles for the block or use the styles included. To use the styles included, add the following to your layout or view:
For a complete example, take a look at the included [example controllers] (https://github.com/kss-php/KssBridgeBundle/blob/master/Controller), views, and stylesheets.