Our server has a custom language-switcher for our CSS files. It recognizes certain patterns and switches left
& right
commands (among other things). To tell it where to switch, we use @RIGHT@
and @LEFT@
wherever needed:
div.somecls {
margin-@RIGHT@: 15px;
&:after {
content: "\f061";
font-family: FontAwesome;
position: absolute;
@LEFT@: 10px;
top: 20px;
}
}
This also extends to class names themselves:
.push-@RIGHT@ {
/* ... */
}
Till now, I wrote a node-script that compiled the css then replaced left
and right
with the proper replacements. However, I'm wondering - is there's a way to tell LESS to just ignore some things and regard them as normal?
That way I could write @LEFT@
in the LESS file itself instead of overthinking it all (this would allow a lot of flexibility, especially if there are cases where I don't want the language switcher to do anything and rather use left
)