Sridhar K
Sridhar K

Reputation: 31

single line comments on external css file

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.

style.css

//{ 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

Answers (2)

Adam
Adam

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

Related Questions