Skip to content

Less ruleset declaration: semicolon is removed #3093

Closed

Description

@slorber

Prettier 1.7.4
Playground link

--parser less
--print-width 120

Input:

// declare detached ruleset
@detached-ruleset: { background: red; };

// use detached ruleset
.top {
    @detached-ruleset(); 
}

Output:

// declare detached ruleset
@detached-ruleset: {
  background: red;
}

// use detached ruleset
.top {
  @detached-ruleset();
}

Expected behavior:

// declare detached ruleset
@detached-ruleset: {
  background: red;
};

// use detached ruleset
.top {
  @detached-ruleset();
}

The ; at the end of the @detached-ruleset should still be there, as documented by http://lesscss.org/features/#detached-rulesets-feature

Activity

  1. added
    lang:css/scss/less
    on Oct 24, 2017
  2. lydell commented on Oct 24, 2017

    @lydell
    Member

    @slorber Does the absence of the semicolon cause compilation errors? Just trying understand the severity of this bug.

  3. slorber commented on Oct 24, 2017

    @slorber
    Author
  4. added
    locked-due-to-inactivity
    on Jul 6, 2018
  5. locked as resolved and limited conversation to collaborators on Jul 6, 2018
  6. added theissue type on Mar 3, 2025
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

    lang:css/scss/lesslocked-due-to-inactivity

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions