Skip to content

CSS: Remove composes usage #10874

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

Merged
merged 18 commits into from
Apr 11, 2025
Merged

CSS: Remove composes usage #10874

merged 18 commits into from
Apr 11, 2025

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Mar 22, 2025

https://github.com/BlueCutOfficial/css-modules-to-scoped-css documents how to migrate from ember-css-modules to ember-scoped-css, which unlocks building the frontend application with https://vite.dev/ instead of webpack.

Unfortunately, ember-scoped-css does not support the composes declaration from ember-css-modules though.

This PR removes/replaces the 97 usages of composes in our codebase. I'm not in love with the solution, but it seems good enough for now to unlock that migration mentioned above.

@Turbo87 Turbo87 added A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear labels Mar 22, 2025
@Turbo87 Turbo87 requested review from a team and removed request for a team March 22, 2025 12:48
@Turbo87 Turbo87 force-pushed the composes branch 2 times, most recently from cb0258d to 494f12e Compare March 22, 2025 16:47
@Turbo87
Copy link
Member Author

Turbo87 commented Mar 23, 2025

looks like there are a bunch of CSS specificity issues that only show up when restarting the ember serve command... 😩

Turbo87 added 14 commits April 10, 2025 11:45
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
Turbo87 added 4 commits April 10, 2025 14:22
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
This prepares for the migration to ember-scoped-css, which does not support `composes`.
Comment on lines +58 to +72
// see https://github.com/salsify/ember-css-modules/blob/v2.0.1/docs/ORDERING.md
headerModules: [
'crates-io/styles/shared/a11y',
'crates-io/styles/shared/buttons',
'crates-io/styles/shared/forms',
'crates-io/styles/shared/sort-by',
'crates-io/styles/shared/typography',
'crates-io/styles/application',
// for the `.load-more` class
'crates-io/styles/dashboard',
// for the `.scopes-list` class
'crates-io/styles/settings/tokens/new',
// for the `.box-link` class
'crates-io/components/front-page-list/item',
],
Copy link
Member Author

@Turbo87 Turbo87 Apr 10, 2025

Choose a reason for hiding this comment

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

not a great long-term solution, but this solves the specificity issues. previously the composes declarations ensured the right order in the CSS file, but since we no longer use composes we need to explicitly declare it.

@Turbo87 Turbo87 requested a review from a team April 10, 2025 12:38
@Turbo87 Turbo87 merged commit f723187 into rust-lang:main Apr 11, 2025
10 checks passed
@Turbo87 Turbo87 deleted the composes branch April 11, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant