Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

  • Explore repository structure and understand current SCSS setup
  • Analyze current SCSS features usage (mixins, functions, placeholders, @if/@each/@else)
  • Create migration specification document with detailed analysis (docs/migration/sass-to-postcss.md)
  • Create migration script prototype in the migration package
  • Add tests for the new migration script
  • Run tests to verify migration script works correctly
  • Document the two-output PostCSS build approach (chromium vs legacy) - documented in spec
  • Address code review feedback:
    • Fixed dollar sign escaping in mixin parameter replacement
    • Added single-quote support for @use and @forward imports
    • Fixed comment regex to avoid URL issues
    • Enhanced partial import patterns for various path formats
    • Updated test assertions to use toBeDefined() matcher
  • Add postcss-each plugin for Sass @each loop replacement

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/copilot/evaluate-sass-to-postcss-migration

@changeset-bot
Copy link

changeset-bot bot commented Dec 29, 2025

⚠️ No Changeset found

Latest commit: e01b93e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Evaluate migrating from Sass to PostCSS feat(migration): Add SASS to PostCSS migration evaluation and script Dec 29, 2025
Copilot AI requested a review from mfranzke December 29, 2025 15:16
@mfranzke
Copy link
Collaborator

@copilot for Sass @each replacement, we could use postcss-each PostCSS plugin.

Co-authored-by: mfranzke <787658+mfranzke@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot for Sass @each replacement, we could use postcss-each PostCSS plugin.

Added postcss-each to the Core Plugins list and updated documentation to recommend it as the primary approach for @each loop replacement. Commit a95e451.

@nmerget
Copy link
Collaborator

nmerget commented Jan 23, 2026

@mfranzke I don't get this... Why would we want to do this? What is the purpose of this?

We would swap a dependency sass with postcss + x postcss-plugins for a 1:1 migration. In the end we rely on more dependencies to achive the same goal

@mfranzke
Copy link
Collaborator

mfranzke commented Jan 23, 2026

@mfranzke I don't get this... Why would we want to do this? What is the purpose of this?

We would swap a dependency sass with postcss + x postcss-plugins for a 1:1 migration. In the end we rely on more dependencies to achive the same goal

it's about three things:

  • Consolidation: We won't necessarily get (much) more dependencies (especially not in the long run), but only one or two for a transition period, but especially consolidate our CSS handling from two ecosystems (SASS + PostCSS) to one (PostCSS). As soon as each of the unsupported CSS features we still need to mitigate is Baseline, we could even phase out PostCSS plugins easily, one by one.
  • Performance: We would be able to ship up to 50% less CSS – based in a first simple test set-up; to get better numbers and more clarity on the topic, to make better decisions, this is especially why we should be doing this. And make use of features and simplifications that partly more than 90% of our users could benefit from, instead of having all of our users wait for them.
  • Simplification: We could write simpler, future proven code.

The question isn't about why we should be doing this (adapting standardized approaches), but only when. What other conditions do you identify to wait for ?

@github-actions github-actions bot added the 📕documentation Improvements or additions to documentation label Jan 24, 2026
@nmerget
Copy link
Collaborator

nmerget commented Jan 26, 2026

We would be able to ship up to 50% less CSS

Can you prove this, sounds to much for me.

Furthermore, I doubt that any IDE can handle the postCSS plugin stuff inside a .css file. You would see a lot of errors inside you IDE, which makes developing harder. Additionally, we remove a complete styling output target. Users couldn't use SCSS if they want to. Some of the postCSS packages have 30k downloads, published 5 years ago - compared to sass with 20 mio. downloads.

This feels like swapping a proofed technology with some shaky ducktaped equivalent, causing a lot of work for some promise wirtten by AI...

@mfranzke
Copy link
Collaborator

Can you prove this, sounds to much for me.

That's what this PR is all about in the first phase, as we don't have any numbers.

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

Labels

📕documentation Improvements or additions to documentation

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants