Nasir
Nasir

Reputation: 4865

How do I escape a backslash in LESS?

I'm having some issues escaping a backslash in LESS. Here's my code:

&.room {
    &:after {
        content:"\";
    }
}

Any help would be greatly appreciated, many thanks.

Upvotes: 1

Views: 1323

Answers (2)

softvar
softvar

Reputation: 18435

Just ran into this issue, Escaping quotes keeps the escape backslash in

content: ~"\"";

produces

content: \";

Can refer to the official repository of less. ISSUES

OR as @SLC mentioned, can use double backslash.

Upvotes: 2

NibblyPig
NibblyPig

Reputation: 52932

&.room {
    &:after {
        content:"\\";
    }
}

Upvotes: 3

Related Questions