mblode / mblode/vscode-pretty-formatter

CSS media queries get formatted incorrectly.

Open
#18 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

formatter
Dominant language
JavaScript
Stars
26
Forks
8
PR merge metrics
No merged PRs in 30d

Description

When I format CSS, the and part of media queries get condensed (its assuming its like url() or var()).
See image below:

image

I would be ok with this if it worked, but it doesn't.

I might have missed a setting, but I can only find one that makes the exact opposite happen to url() and var() and some other stuff.

"pretty-formatter.functionName": true

image
image

My normal settings:

"pretty-formatter.braces": true,
"pretty-formatter.preserveComment": true,
"pretty-formatter.tagMerge": true,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the CSS formatting problem described in issue #18 using the supplied media-query example and the listed pretty-formatter settings. Start by tracing the formatter's handling of media-query and, url(), and var() expressions. Done means media queries remain valid while the existing function-formatting behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.