Reputation: 31
I want to know whether external css files has single line comments or not.
I am using an external css file(styles.css) and i want to use single line comments in that file.I have tried using "//", "#", "--" but none of them worked.I know we can use "/*.....Comments here....*/" in single line but in my case I have to use single line commands. please help.
//{ strarBlock
.user-title {
position: relative;
display: block;
border: 1px solid #c1bd9e;
margin-top: -3px;
background-color: #fafafa;
.......
//} endBlock
//{ strarBlock
.user-details {
position: relative;
display: block;
border: 1px solid #c1bd9e;
margin-top: -3px;
background-color: #fafafa;
.......
//} endBlock
Upvotes: 1
Views: 1175
Reputation:
You can use a preprocessor to remove the //
comments:
Upvotes: 1
Reputation: 18855
Single line comments in CSS are single line comments:
/* single line comments */
There's no other way.
But you still can use a pseudo vendor prefix to comment properties:
.sample {
-commented-color: red;
}
Upvotes: 1