CSSC Syntax

User Defined Property and Usage
// Property Declaration
$color {
color: #eee;
}

#elementid {
// Property Usage
$color;
}

Output:
#elementid {
color: #eee;
}

User defined property with parameters
// Property Declaration
$simpleborder: $width, $style {
border-width: $width;
border-style: $style;
}

.simpleclass {
// Property Usage
$simpleborder: 10px solid;
}

Output:
.simpleclass {
border-width: 10px;
border-style: solid;
}

User defined property using namespaces
$namespace {
simpleborder: $width, $style {
border-width: $width;
border-style: $style;
}
}

.simpleclass {
$namespace.simpleborder: 10px solid;
}

Output:
.simpleclass {
border-width: 10px;
border-style: solid;
}

Variable Declaration
$pagewidth = 10px;

#content {
width: $pagewidth;
}

Output:
#content {
width: 10px;
}

Last edited Nov 25, 2009 at 8:47 PM by DuNuNuBatman, version 1

Comments

No comments yet.