Docs Home

sb.css.rules.write

@File: /surebert/css/rules.js

@Description: Used to write or override CSS rules on the page


@Example:

sb.css.rules.write('p', 'background-color;red;');
//writes the following into the pages css
p{
    background-color:red;
}

sb.css.rules.write('.box', 'background-color;red;');
//writes the following into the pages css
.box{
    background-color:red;
}

sb.css.rules.write('#myList', 'background-color;red;');
//writes the following into the pages css
#myList{
    background-color:red;
}

sb.css.rules.write('#myList:hover', 'background-color:blue;font-size:30px;');
//writes the following into the pages CSS
#myList:hover{
    background-color:red;
    font-size:30px;
}