dss/README.md

76 строки
1.8 KiB
Markdown
Исходник Обычный вид История

![DSS](http://f.cl.ly/items/1J353X3U172A1u3r2K3b/dss-logo.png)
2013-03-02 21:03:25 +04:00
DSS
2012-08-24 00:50:17 +04:00
2012-08-24 01:29:57 +04:00
**@version 1.0**
**@logo [DSS](http://f.cl.ly/items/1J353X3U172A1u3r2K3b/dss-logo.png)**
2012-08-24 01:29:57 +04:00
**DSS**, Documented Style Sheets, is a parser and style guide that creates UI documentation objects from properly commented CSS, LESS, STYLUS, SASS and SCSS files.
2012-08-24 01:29:57 +04:00
2013-03-02 17:09:49 +04:00
### Example Comment Block
2012-08-24 01:29:57 +04:00
2013-03-02 17:09:49 +04:00
```css
/**
* @name Button
* @description Your standard form button.
*
* @state :hover - Highlights when hovering.
* @state :disabled - Dims the button when disabled.
* @state .primary - Indicates button is the primary action.
* @state .smaller - A smaller button
*
* @markup
* <button>This is a button</button>
*/
````
#### or
```scss
//
// @name Button
// @description Your standard form button.
//
// @state :hover - Highlights when hovering.
// @state :disabled - Dims the button when disabled.
// @state .primary - Indicates button is the primary action.
// @state .smaller - A smaller button
//
// @markup
// <button>This is a button</button>
//
````
### Example Generated Object
```javascript
{
"name": "Button",
"description": "Your standard form button.",
"state": [
{
"name": ":hover",
"escaped": "pseudo-class-hover",
"description": "Highlights when hovering."
},
{
"name": ":disabled",
"escaped": "pseudo-class-disabled",
"description": "Dims the button when disabled."
},
{
"name": ".primary",
"escaped": "primary",
"description": "Indicates button is the primary action."
},
{
"name": ".smaller",
"escaped": "smaller",
"description": "A smaller button"
}
],
"markup": {
"example": "<button>This is a button</button>",
"escaped": "&lt;button&gt;This is a button&lt;/button&gt;"
}
}
````