Skip to content

Conversation

@RobinMalfait
Copy link
Member

This PR is a very small improvement. We started pretty printing the generated CSS (proper indentation) a while ago, so that we can use the output as-is for intellisense (on hover).

The other day I noticed that when you use !important that we attach it directly to the declaration. Not the end of the world, but this PR injects a little space to make sure that the !important is separated from the value which makes it a little easier to read and looks more like what you would write by hand.

Before:

.flex\! {
  display: flex!important;
}

After:

.flex\! {
  display: flex !important;
}

@RobinMalfait RobinMalfait force-pushed the feat/pretty-print-important branch from e8b5c8d to 44cc4d9 Compare October 7, 2024 09:29
@RobinMalfait RobinMalfait changed the title Pretty print !important Pretty print !important in declarations Oct 7, 2024
@RobinMalfait RobinMalfait merged commit ab0abcf into next Oct 7, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the feat/pretty-print-important branch October 7, 2024 09:38
philipp-spiess pushed a commit that referenced this pull request Oct 7, 2024
This PR is a very small improvement. We started pretty printing the
generated CSS (proper indentation) a while ago, so that we can use the
output as-is for intellisense (on hover).

The other day I noticed that when you use `!important` that we attach it
directly to the declaration. Not the end of the world, but this PR
injects a little space to make sure that the `!important` is separated
from the value which makes it a little easier to read and looks more
like what you would write by hand.

Before:
```css
.flex\! {
  display: flex!important;
}
```

After:
```css
.flex\! {
  display: flex !important;
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants