Escaping attribute selectors in LESS

December 18th, 2012  |  Published in hacks

I had a really rough time finding any documentation about how to do this.  To escape attribute selectors in LESS, you have to escape the selector and wrap the escaped string in parenthesis:

(~"[data-wysihtml5-command]") {
  text-decoration: none;
}