Skip to content
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

[css/modules] composes chain is broken due to order of class names #8240

Closed
Thiry1 opened this issue Nov 7, 2023 · 1 comment · Fixed by #8930
Closed

[css/modules] composes chain is broken due to order of class names #8240

Thiry1 opened this issue Nov 7, 2023 · 1 comment · Fixed by #8930
Assignees
Labels
Milestone

Comments

@Thiry1
Copy link
Contributor

Thiry1 commented Nov 7, 2023

Describe the bug

After merging #8218, allows out-of-order class names for composes.
However composes chain is still affected by order of class names.

Input code

.root-class {
    composes: chain1;
}
.chain1 {
    composes: chain2;
}
.chain2 {
}

Config

No response

Playground link (or link to the minimal reproduction)

Thiry1@0f027ca

SWC Info output

No response

Expected behavior

{
  "chain1": [
    {
      "name": "__local__chain1",
      "type": "local"
    },
    {
      "name": "__local__chain2",
      "type": "local"
    }
  ],
  "chain2": [
    {
      "name": "__local__chain2",
      "type": "local"
    }
  ],
  "root-class": [
    {
      "name": "__local__root-class",
      "type": "local"
    },
    {
      "name": "__local__chain1",
      "type": "local"
    },
+  {
+    "name": "__local__chain2",
+    "type": "local"
+  }
  ]
}

Actual behavior

{
  "chain1": [
    {
      "name": "__local__chain1",
      "type": "local"
    },
    {
      "name": "__local__chain2",
      "type": "local"
    }
  ],
  "chain2": [
    {
      "name": "__local__chain2",
      "type": "local"
    }
  ],
  "root-class": [
    {
      "name": "__local__root-class",
      "type": "local"
    },
    {
      "name": "__local__chain1",
      "type": "local"
    },
-    {
-      "name": "__local__chain2",
-      "type": "local"
-    }
  ]
}

Version

1.3.96

Additional context

No response

@Thiry1 Thiry1 added the C-bug label Nov 7, 2023
@kdy1 kdy1 added this to the Planned milestone Nov 7, 2023
@kdy1 kdy1 self-assigned this Apr 25, 2024
@kdy1 kdy1 closed this as completed in #8930 May 7, 2024
kdy1 added a commit that referenced this issue May 7, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.5.5 May 8, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Jun 7, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants