Skip to content

Extend looses @supports from a file imported by reference #2359

Closed

Description

@SomMeri

Extend does not output @supports located in a file included with reference import option.

Imported file file1.less:

@supports(display: flex) {
  .class1{
    display: flex;
  }
}

Main file test.less:

@import (reference) "file1.less";

.class3{
  &:extend(.class1);
}

Less.js output:

<empty>

Expected output:

@supports(display: flex) {
  .class3 {
    display: flex;
  }
}

Activity

  1. matthew-dean commented on Dec 31, 2014

    @matthew-dean
    Member

    Interesting. But @media doesn't have the same issue?

  2. ddprrt commented on Jan 4, 2015

    @ddprrt
    Contributor

    @media works fine.

  3. lukeapage commented on Jan 4, 2015

    @lukeapage
    Member

    Not surprising, they are handled in different ways.
    Really they should extend the same base class and then @support would support bubbling like @media

  4. ddprrt commented on Jan 4, 2015

    @ddprrt
    Contributor

    Does @media has any special features which have to be considered for the output? Would suggest an AtRule class handling both.

  5. lukeapage commented on Jan 4, 2015

    @lukeapage
    Member

    Yes, the way media conditions are combined. We have a directive node
    already for 'at rules'. I would consider

    Directive
    DirectiveRuleset
    BubblingDirectiveRuleset (abstract)
    Media
    Supports

    At the mo it is

    Directive
    Media

  6. celmaun commented on Jan 15, 2015

    @celmaun

    +1 for bubbling support.

  7. self-assigned this
    on Jan 22, 2015
  8. added a commit that references this issue on Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions