Wrong indentation for the last in a series of gradients followed by background-color
Open
Nobody has claimed this yet.
lang:css/scss/less
- Dominant language
- JavaScript
- Stars
- 52.3k
- Forks
- 5k
- Avg merge
- 19h 2m
- Merged PRs (30d)
- 117
Description
Prettier 2.8.4
Playground link
--parser css
--print-width 60
--tab-width 4
Input:
background: linear-gradient(
to right,
rgb(119, 59, 210),
rgba(185, 54, 210, 0)
),
linear-gradient(
to right,
rgb(119, 59, 210),
rgba(136, 60, 210, 0.74074) 33.704%,
rgba(168, 57, 210, 0.25926) 66.296%,
rgba(185, 54, 210, 0)
),
linear-gradient(
to right,
hsl(263.84, 62.66%, 52.75%),
hsla(276.93, 62.74%, 52.8%, 0.5) 50%,
hsla(290.38, 63.41%, 51.76%, 0)
)
#0000ff;
Output:
background: linear-gradient(
to right,
rgb(119, 59, 210),
rgba(185, 54, 210, 0)
),
linear-gradient(
to right,
rgb(119, 59, 210),
rgba(136, 60, 210, 0.74074) 33.704%,
rgba(168, 57, 210, 0.25926) 66.296%,
rgba(185, 54, 210, 0)
),
linear-gradient(
to right,
hsl(263.84, 62.66%, 52.75%),
hsla(276.93, 62.74%, 52.8%, 0.5) 50%,
hsla(290.38, 63.41%, 51.76%, 0)
)
#0000ff;
Expected behavior:
background: linear-gradient(
to right,
rgb(119, 59, 210),
rgba(185, 54, 210, 0)
),
linear-gradient(
to right,
rgb(119, 59, 210),
rgba(136, 60, 210, 0.74074) 33.704%,
rgba(168, 57, 210, 0.25926) 66.296%,
rgba(185, 54, 210, 0)
),
linear-gradient(
to right,
hsl(263.84, 62.66%, 52.75%),
hsla(276.93, 62.74%, 52.8%, 0.5) 50%,
hsla(290.38, 63.41%, 51.76%, 0)
)
#0000ff;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Prettier Playground reproduction using the CSS parser, 60-column print width, and four-space tab width. Trace the CSS formatting path for a series of gradients followed by a background color, then add coverage for this input and verify that the final gradient and color use the expected indentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100