MINOR Css coding conventions for CMS

This commit is contained in:
Ingo Schommer 2012-05-16 11:38:20 +02:00
parent 51eb70781b
commit 6e99e187b4
2 changed files with 6 additions and 0 deletions

View File

@ -441,3 +441,8 @@ See [security](/topics/security) for conventions related to handing security per
Parts of these coding conventions were adapted from [Zend Framework](http://framework.zend.com/manual/en/coding-standard.overview.html),
which are licensed under BSD (see [license](http://framework.zend.com/license)).
## Related
* [Topics: CSS](/topics/css)
* [Reference: CMS Architecture](/reference/cms-archirecture)

View File

@ -37,6 +37,7 @@ plain CSS without SCSS for your custom CMS interfaces as well, we just mandate S
As there's a whole lot of CSS driving the CMS, we have certain best practives around writing it:
* Use dashed lowercase naming for both `id` and `class` attributes (`my-class-name`), instead of camel case (`myClassName`)
* Use the `id` attribute sparingly. Remember that it "closes off" the structure to code reuse, as HTML elements
require unique `id` attributes. Code reuse can happen both in CSS and JavaScript behaviour.
* Separate presentation from structure in class names, e.g. `left-menu` is encoding the component position