Skip to content

[Meta] Replace CleanCSS by LightningCSS#2429

Merged
Kocal merged 1 commit into
symfony:2.xfrom
Kocal:meta-replace-clean-css-by-lightning-css
Dec 7, 2024
Merged

[Meta] Replace CleanCSS by LightningCSS#2429
Kocal merged 1 commit into
symfony:2.xfrom
Kocal:meta-replace-clean-css-by-lightning-css

Conversation

@Kocal
Copy link
Copy Markdown
Member

@Kocal Kocal commented Dec 5, 2024

Q A
Bug fix? no
New feature? no
Issues Fix #...
License MIT

One more step to modernize our build stack, by replacing https://github.com/clean-css/clean-css by https://lightningcss.dev/.

TBH it does not bring a lot of value since we only have 4 very small CSS files, buuuut that's for a better future :) (#rolldown)

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Dec 5, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 5, 2024

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
Dropzone
style.min.css 949 B / 475 B 944 B-1% 📉 / 468 B-1% 📉
LiveComponent
live.min.css 79 B / 82 B 78 B-1% 📉 / 81 B-1% 📉
TogglePassword
style.min.css 338 B / 228 B 311 B-8% 📉 / 216 B-5% 📉

@Kocal Kocal force-pushed the meta-replace-clean-css-by-lightning-css branch from b9dcde3 to 3f2e4f4 Compare December 5, 2024 16:06
@Kocal Kocal changed the title [Meta] Replace CleanCSS by Lightning CSS [Meta] Replace CleanCSS by LightningCSS Dec 5, 2024
@Kocal Kocal requested review from WebMamba, kbond and smnandre December 5, 2024 16:16
@Kocal Kocal merged commit 49449f2 into symfony:2.x Dec 7, 2024
@Kocal Kocal deleted the meta-replace-clean-css-by-lightning-css branch December 7, 2024 10:01
@@ -1 +1 @@
[data-loading=""],[data-loading="delay|show"],[data-loading=show]{display:none} No newline at end of file
[data-loading=""],[data-loading=show],[data-loading=delay\|show]{display:none} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kocal Not sure about that... and we may want to discuss this kind of thing together 😅

@@ -1 +1 @@
.toggle-password-container{position:relative}.toggle-password-icon{height:1rem;width:1rem}.toggle-password-button{align-items:center;background-color:transparent;border:none;column-gap:.25rem;display:flex;flex-direction:row;font-size:.875rem;justify-items:center;height:1rem;line-height:1.25rem;position:absolute;right:.5rem;top:-1.25rem} No newline at end of file
.toggle-password-container{position:relative}.toggle-password-icon{width:1rem;height:1rem}.toggle-password-button{background-color:#0000;border:none;flex-direction:row;place-items:center;column-gap:.25rem;height:1rem;font-size:.875rem;line-height:1.25rem;display:flex;position:absolute;top:-1.25rem;right:.5rem} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1% less compatibility ;)

Comment thread package.json
"@symfony/stimulus-testing": "^2.0.1",
"@vitest/browser": "^2.1.1",
"clean-css": "^5.3.3",
"lightningcss": "^1.28.2",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for the change
-1 for the hurry 😅

Comment thread bin/build_package.js
filename: path.basename(inputStyleFile, '.css'),
code: Buffer.from(css),
minify: true,
sourceMap: false, // TODO: Maybe we can add source maps later? :)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source Maps have more interest when there is multiple source files, variables, etc.. not the case here.

But if we have a component offering CSS, why not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants