-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS
Description
Negative values in e.g. CSS backgrounds seem to cause some weird behaviour with the wrapping. Are they perhaps ignored?
Prettier 1.13.2
Playground link
--parser cssInput:
.this-will-not-wrap {
background: transparent url(/long/path/to/dummy-image.svg) -1000px center no-repeat;
}
.this-will-wrap-correctly {
background: transparent url(/long/path/to/dummy-image.svg) 1000px center no-repeat;
}
.this-will-also-wrap-but-incorrectly {
background: transparent url(/even/longer/path/to/dummy-image.svg) -1000px center no-repeat;
}Output:
.this-will-not-wrap {
background: transparent url(/long/path/to/dummy-image.svg) -1000px center no-repeat;
}
.this-will-wrap-correctly {
background: transparent url(/long/path/to/dummy-image.svg) 1000px center
no-repeat;
}
.this-will-also-wrap-but-incorrectly {
background: transparent url(/even/longer/path/to/dummy-image.svg) -1000px center
no-repeat;
}Expected behavior:
.this-will-not-wrap {
background: transparent url(/long/path/to/dummy-image.svg) -1000px center
no-repeat;
}
.this-will-wrap {
background: transparent url(/long/path/to/dummy-image.svg) 1000px center
no-repeat;
}
.this-will-also-wrap-but-incorrectly {
background: transparent url(/even/longer/path/to/dummy-image.svg) -1000px
center no-repeat;
}Metadata
Metadata
Assignees
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS