Skip to content

Less: ::before becomes : : before in detached rulesets #5791

@tossp

Description

@tossp

::before not : : before😭

Prettier 1.16.1
Playground link

--parser less

Input:

@ql-sizes: '10px', '12px', '14px', '16px', '18px', '20px', '24px';

.ql-snow {
  .for(
    @ql-sizes,
    {.ql-size .ql-picker-label,
    .ql-size .ql-picker-item {
      &[data-value= '@{adItem}' ]::before {content: '@{adItem}';
    }}}
  );
}

Output:

@ql-sizes: "10px", "12px", "14px", "16px", "18px", "20px", "24px";

.ql-snow {
  .for(
    @ql-sizes,
    {.ql-size .ql-picker-label,
    .ql-size .ql-picker-item {&[data-value= "@{adItem}" ]: : before {content: "@{adItem}"
      ;}}}
  );
}

Expected behavior:

@ql-sizes: '10px', '12px', '14px', '16px', '18px', '20px', '24px';

.ql-snow {
  .for(@ql-sizes, {.ql-size .ql-picker-label,  .ql-size .ql-picker-item {
      &[data-value= '@{adItem}' ]::before {content: '@{adItem}';
    }}}
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSlang:lessIssues affecting Less-specific syntax (not plain CSS)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions