Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 28, 2025

Previously we'd include an unnecessary space when removing a line comment in cases like:

Input:

styled.div`
  .a // comment
  { color: red; }
`

Previous output post-minification:

styled.div`.a {color:red;}`

After this PR:

styled.div`.a{color:red;}`

We still include excess spaces when removing block comments (e.g. styled.div`.a /* */ {}` -> styled.div`.a {}` ), but that's more complicated to fix, so leaving it for now.

Copy link
Member Author

overlookmotel commented Aug 28, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel force-pushed the 08-28-fix_transformer_styled-components_remove_space_before_line_comment_in_css_minification branch from 097b9ee to 167d41a Compare August 28, 2025 23:06
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 28, 2025

CodSpeed Instrumentation Performance Report

Merging #13371 will not alter performance

Comparing 08-28-fix_transformer_styled-components_remove_space_before_line_comment_in_css_minification (df38b2c) with main (8f98841)1

Summary

✅ 38 untouched benchmarks

Footnotes

  1. No successful run was found on main (a7a06b7) during the generation of this report, so 8f98841 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel marked this pull request as ready for review August 28, 2025 23:10
@overlookmotel overlookmotel requested a review from Dunqing as a code owner August 28, 2025 23:10
@overlookmotel overlookmotel force-pushed the 08-28-fix_transformer_styled-components_remove_space_before_line_comment_in_css_minification branch from 167d41a to 90c09c4 Compare August 29, 2025 01:17
@overlookmotel overlookmotel force-pushed the 08-28-fix_transformer_styled-components_fix_block_comment_containing_expression_in_css_minification branch from 99b0af8 to 4caa808 Compare August 29, 2025 01:17
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Aug 29, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 29, 2025

Merge activity

…in CSS minification (#13371)

Previously we'd include an unnecessary space when removing a line comment in cases like:

Input:

```js
styled.div`
  .a // comment
  { color: red; }
`
```

Previous output post-minification:

```js
styled.div`.a {color:red;}`
```

After this PR:

```js
styled.div`.a{color:red;}`
```

We still include excess spaces when removing block comments (e.g. ``styled.div`.a /* */ {}` `` -> ``styled.div`.a {}` ``), but that's more complicated to fix, so leaving it for now.
@graphite-app graphite-app bot force-pushed the 08-28-fix_transformer_styled-components_fix_block_comment_containing_expression_in_css_minification branch from 4caa808 to a7a06b7 Compare August 29, 2025 03:16
@graphite-app graphite-app bot force-pushed the 08-28-fix_transformer_styled-components_remove_space_before_line_comment_in_css_minification branch from 90c09c4 to df38b2c Compare August 29, 2025 03:16
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 29, 2025
Base automatically changed from 08-28-fix_transformer_styled-components_fix_block_comment_containing_expression_in_css_minification to main August 29, 2025 03:21
@graphite-app graphite-app bot merged commit df38b2c into main Aug 29, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 08-28-fix_transformer_styled-components_remove_space_before_line_comment_in_css_minification branch August 29, 2025 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants