PHPackages                             kiefer79/kss-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kiefer79/kss-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kiefer79/kss-php
================

A PHP implementation of KSS: a methodology for documenting CSS and generating styleguides

2.0.3(7y ago)010.8kMITPHPPHP &gt;=5.3.3

Since Jan 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/kiefer79/kss-php)[ Packagist](https://packagist.org/packages/kiefer79/kss-php)[ RSS](/packages/kiefer79-kss-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (23)Used By (0)

Knyle Style Sheets
==================

[](#knyle-style-sheets)

This is a PHP implementation of [Knyle Style Sheets](http://warpspire.com/kss) (KSS). KSS attempts to provide a methodology for writing maintainable, documented CSS within a team. Specifically, KSS is a documentation specification and styleguide format. It is **not** a preprocessor, CSS framework, naming convention, or specificity guideline.

- **[The Spec (What KSS is)](https://github.com/kneath/kss/blob/master/SPEC.md)**
- **[Example living styleguide](https://github.com/kss-php/kss-php/tree/master/example)**

KSS in a nutshell
-----------------

[](#kss-in-a-nutshell)

The methodology and ideas behind Knyle Style Sheets are contained in [SPEC.md](https://github.com/kneath/kss/blob/master/SPEC.md) of the origin [ruby version](https://github.com/kneath/kss) of KSS. At its core, KSS is a documenting syntax for CSS.

```
/*
A button suitable for giving stars to someone.

Markup: Button

:hover              - Subtle hover highlight.
.stars--given       - A highlight indicating you've already given a star.
.stars--given:hover - Subtle hover highlight on top of stars-given styling.
.stars--disabled    - Dims the button to indicate it cannot be used.

Styleguide Buttons - Star Button
*/
a.button.star {
  ...
}
a.button.star:hover {
  ...
}
a.button.stars--given {
  ...
}
a.button.stars--given:hover {
  ...
}
a.button.stars--disabled {
  ...
}
```

PHP Library
-----------

[](#php-library)

This repository includes a php library suitable for parsing SASS, SCSS, and CSS documented with KSS guidelines. To use the library, include it in your project as a composer dependency (see below). Then, create a parser and explore your KSS.

```
