atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.99k stars 67 forks source link

Sort shorthand across multi-properties #1732

Closed kylorhall-atlassian closed 6 days ago

kylorhall-atlassian commented 6 days ago

What is this change?

Making sure sorting works across mutli-property classes.

Example: this {-webkit-text-decoration-color:initial;text-decoration-color:initial} currently blocks all sorting above or below it, effectively creating a new "sorting bucket" because it always returns 0 as a or b.

This doesn't get sorted:

._y44v1tgl{animation:kbayob8 5s ease infinite}
._syaz1qtk{color:var(--ds-link)}
._1jmq18uv{-webkit-text-decoration-color:initial;text-decoration-color:initial}
._zulph461{gap:var(--ds-space-050)}

Added a test to show how this works now!

PR checklist

I have...

changeset-bot[bot] commented 6 days ago

🦋 Changeset detected

Latest commit: cccb61083768f2140ad47e3ffc34cc9316e270ef

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------- | ----- | | @compiled/css | Patch |

Not sure what this means? Click here to learn what changesets are.

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

netlify[bot] commented 6 days ago

Deploy Preview for compiled-css-in-js canceled.

Name Link
Latest commit cccb61083768f2140ad47e3ffc34cc9316e270ef
Latest deploy log https://app.netlify.com/sites/compiled-css-in-js/deploys/67196426e5758b000929e108