Fix the Documentation Regarding Pseudo-Class Selectors

cwerby's Avatar

cwerby

09 Sep, 2010 12:50 AM

I'm new to Less and I ran into a problem with pseudo-class selectors not working properly. I found the answer on dotless which has some Less documentation.

The documentation doesn't mention that essential trick of placing an ampersand in front of a pseudo-class selector to avoid the white space in the compiled file. For example:

a
{
    &:hover {color:blue;}
}

You might change it by adding the ampersand before the pseudo-class selector in two places: the "Nested Rules" section and the "Namespaces & Accessors" section.

I really love Less!

  1. 1 Posted by Loonrykniny on 08 Aug, 2013 09:57 AM

    Loonrykniny's Avatar

    ??

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac