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

[css] Add CSS formatting option to place open brace on new line #146398

Closed
brunnerh opened this issue Mar 31, 2022 · 3 comments
Closed

[css] Add CSS formatting option to place open brace on new line #146398

brunnerh opened this issue Mar 31, 2022 · 3 comments
Assignees
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@brunnerh
Copy link

It would be nice if the CSS formatter had an option analogous to the JS/TS options to place open braces on a new line.

{
	// Existing brace options:
	"typescript.format.placeOpenBraceOnNewLineForFunctions": true,
	"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
	"javascript.format.placeOpenBraceOnNewLineForFunctions": true,
	"javascript.format.placeOpenBraceOnNewLineForControlBlocks": true
}

The underlying CSS formatter Beautify has an option to do this:
brace-style needs to be set to expand (default is collapse).

@aeschli
Copy link
Contributor

aeschli commented Mar 31, 2022

We use beautifyjs as the underlying CSS formatter. Would you mind filing this request directly against https://github.com/beautify-web/js-beautify ?

@aeschli aeschli closed this as completed Mar 31, 2022
@brunnerh
Copy link
Author

@aeschli Please re-read the issue description. This is not about an issue in Beautify itself, but VS Code not having an option to control its behavior.

I explicitly noted that Beautify already has the required capabilities:

The underlying CSS formatter Beautify has an option to do this:
brace-style needs to be set to expand (default is collapse).

@aeschli
Copy link
Contributor

aeschli commented Mar 31, 2022

Sorry for missing your last sentence, I wasn't aware that this also is supported for css

@aeschli aeschli reopened this Mar 31, 2022
@aeschli aeschli added this to the April 2022 milestone Mar 31, 2022
@aeschli aeschli changed the title Add CSS formatting option to place open brace on new line [css] Add CSS formatting option to place open brace on new line Apr 1, 2022
@aeschli aeschli added feature-request Request for new features or functionality css-less-scss Issues and items concerning CSS,Less,SCSS styling verification-needed Verification of issue is requested labels Apr 1, 2022
aeschli added a commit to microsoft/vscode-css-languageservice that referenced this issue Apr 1, 2022
@aeschli aeschli closed this as completed in 1305aac Apr 1, 2022
@amunger amunger added the verified Verification succeeded label Apr 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@brunnerh @amunger @aeschli and others