Skip to content

@include not respecting 80 columns #2158

Closed
Closed

Description

@sdougbrown

It'd be preferable to break up long @include lines, I think...

.selector {
  @include absolute($top: $long-variable-name, $right: $long-variable-name, $left: auto, $bottom: auto);
}

should reformat too...

.selector {
  @include absolute(
    $top: $long-variable-name,
    $right: $long-variable-name,
    $left: auto,
    $bottom: auto
  );
}

I was planning on submitting a PR with a failing test, but I don't think I'll have time today so I just wanted to flag this. Thanks for everyone's work with this project so far. 😄


https://prettier.github.io/prettier/#%7B%22content%22%3A%22.selector%20%7B%5Cn%20%20%40include%20absolute(%24top%3A%20%24long-variable-name%2C%20%24right%3A%20%24long-variable-name%2C%20%24left%3A%20auto%2C%20%24bottom%3A%20auto)%3B%5Cn%7D%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3A%22none%22%2C%22bracketSpacing%22%3Atrue%2C%22jsxBracketSameLine%22%3Afalse%2C%22parser%22%3A%22postcss%22%2C%22semi%22%3Atrue%2C%22useTabs%22%3Afalse%2C%22doc%22%3Afalse%7D%7D

Activity

  1. azz commented on Jun 17, 2017

    @azz
    Member

    Looks like we're not currently pretty-printing the content of the @include rule, it's just being printed as-is.

    I experimented with using our value parser to parse it with some success, but had to do a couple of hacks just to make it work, so I won't be opening a pull request with these changes.

    azz@8398645#diff-64e0fbec5105a0d95768fb18e882472fR7

    Maybe there's a more robust way of solving this.

  2. added
    lang:css/scss/less
    on Jun 17, 2017
  3. changed the title [-]SCSS - `@include` ignored[/-] [+]`@include` not respecting 80 columns[/+] on Jun 21, 2017
  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