Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix left side of collapsing row border #40

Merged
merged 6 commits into from
Aug 25, 2021

Conversation

thinkh
Copy link
Member

@thinkh thinkh commented Jul 22, 2021

Fixes lineupjs/lineupjs#456

Summary

grafik

thinkh added 2 commits July 22, 2021 16:00
Fixes lineupjs/lineupjs#456

- Uses the updated code example from https://stackoverflow.com/a/28807765
- Modify the top border (= last box shadow part)
@thinkh
Copy link
Member Author

thinkh commented Jul 22, 2021

The linter seems to have a conditions that exclude each other. If I commit the following Prettier output (formatting on save) ...

@mixin collapsing-row-border($border-width, $border-color) {
  // use box-shadow to create collapsing border (@see https://stackoverflow.com/a/28807765)
  box-shadow: $border-width 0 0 0 $border-color, 0 $border-width 0 0 $border-color,
    $border-width $border-width 0 0 $border-color /* Just to fix the corner */, $border-width 0 0 0 $border-color inset,
    0 0 0 $border-width $border-color;
}

... the linter complains:

Checking formatting...
All matched files use Prettier code style!

src/styles/_mixins.scss
 3:48  ✖  Expected newline after "," in a multi-line list   value-list-comma-newline-after
 4:79  ✖  Expected newline after "," in a multi-line list   value-list-comma-newline-after

Error: Process completed with exit code 2.

Putting every part in the new line like so...

@mixin collapsing-row-border($border-width, $border-color) {
  // use box-shadow to create collapsing border (@see https://stackoverflow.com/a/28807765)
  box-shadow: $border-width 0 0 0 $border-color,
    0 $border-width 0 0 $border-color,
    $border-width $border-width 0 0 $border-color /* Just to fix the corner */,
    $border-width 0 0 0 $border-color inset,
    0 0 0 $border-width $border-color;
}

... returns the following error:

Checking formatting...
[warn] src/styles/_mixins.scss
[warn] Code style issues found in the above file(s). Forgot to run Prettier?
Error: Process completed with exit code 1.

@sgratzl How should I proceed here? Can we either change Prettier or the stylelint config?

@sgratzl
Copy link
Member

sgratzl commented Aug 24, 2021

@sgratzl How should I proceed here? Can we either change Prettier or the stylelint config?

I would change the stylelint config

@thinkh thinkh changed the base branch from develop to sgratzl/upgrade2 August 24, 2021 21:50
Base automatically changed from sgratzl/upgrade2 to develop August 25, 2021 12:46
Copy link
Member

@sgratzl sgratzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabled stylelint for this one line

@sgratzl sgratzl merged commit 2e38f38 into develop Aug 25, 2021
@sgratzl sgratzl deleted the thinkh/456_fix-collapsing-row-border branch August 25, 2021 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants