Difference between #5 and #6 of
CSS Naming Conventions

Revision #6 has been created by resurtm on Nov 21, 2011, 7:00:27 AM with the memo:

« previous (#5) next (#7) »


Title unchanged

CSS Naming Conventions

Category unchanged


Yii version unchanged

Tags unchanged

CSS, naming conventions

Content changed

- CSS class naming and style declaration for a widget view follow the similar rules for action views. For example, the `LatestComments` widget should use root CSS class name as `widget-latest-comments`, and declare its comment styles in the `widget-latest-comments.css` file like the following:

/* in widget-latest-comment.css file */
s .comment {

- A layout view file should also have a root container named after the layout name with prefix `layout-`. For example, the `main` layout should use CSS class named as `layout-main` for its root container. To avoid naming conflict with the inserted view content, the CSS class of container elements in the layout may be prefixed with the root container class name. For example, the header section may use the name `layout-main-header`; the content section may use `layout-main-content`.
35 0
Viewed: 33 753 times
Version: 1.1
Category: Tutorials
Written by: qiang
Last updated by: Gismo
Created on: Oct 22, 2010
Last updated: 5 years ago
Update Article


View all history