Reputation: 13693
I designing a webkit based web application and i am generating my css using c++ and so naturally i am on a c++ ide.My finished css file looks like
/**
Css Modules and Sub Modules Table Of Content
*/
responsiveGrid();
resets();
/**
* @brief responsiveGrid
* @return
*/
function responsiveGrid(){}
.container{}
/**
* @brief resets
* @return
*/
function resets(){}
.tableView{}
Function definitions shall be deleted and so are the function implementations leaving me with the comments and the clean crisp css code.My problem is with the comments.Will this type of commenting allowed in css3
or css2
?.
Upvotes: 0
Views: 550
Reputation: 45172
You could have figured this out yourself by simply checking the official CSS specifications. The CSS2 specification says in the section on comments
Comments begin with the characters
"/*"
and end with the characters"*/"
. They may occur anywhere outside other tokens, and their contents have no influence on the rendering. Comments may not be nested.
The CSS3 specification has no module covering syntax, so the CSS2 rules apply.
Upvotes: 4
Reputation: 724102
Sure they're allowed as comments as long as they start with /*
and end with */
. They just have the same meaning as any other comment in CSS: none whatsoever.
By the way, these are C-style comments, not C++-style. C++ single-line comments begin with //
, have no end marker, and are not valid CSS.
Upvotes: 1