Skip to content

Extend, :not pseudoclass and element with :nth expression #1580

Closed

Description

@SomMeri

Extend does find match for :not(tr:nth-child(odd)) selector.

Sample input:

:not(tr:nth-child(odd)) {
  selector: nth odd;
}
.elementNth1:extend(:not(tr:nth-child(odd))) {}

Actual output:

:not(tr:nth-child(odd)) {
  selector: nth odd;
}

Expected output:

:not(tr:nth-child(odd)),
.elementNth1 {
  selector: nth odd;
}

Tested on lessc 1.5.0-b3

Activity

  1. SomMeri commented on Oct 4, 2013

    @SomMeri
    MemberAuthor

    The above is the most simple example I could construct. The next less is compiled correctly:

    // Works Correctly
    :nth-child(odd) {
      selector: nth odd;
    }
    .elementNth1:extend(:nth-child(odd)) {}
    
    // Works Correctly
    :not(tr) {
      selector: nth odd;
    }
    .elementNth1:extend(:not(tr)) {}
    
    // Works Correctly
    tr:nth-child(odd) {
      selector: nth odd;
    }
    .elementNth1:extend(tr:nth-child(odd)) {}
  2. lukeapage commented on Oct 15, 2013

    @lukeapage
    Member

    the extend visitor wasn't comparing a sub selector. This is fixed in 1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions