Skip to content

Conversation

@ezzak
Copy link
Contributor

@ezzak ezzak commented Mar 13, 2025

feat(minify-selectors): Add the ability to disable sorting when minifying selectors

}
});
selectors.nodes.sort();
if (opts.preserveOrder !== true) {
Copy link
Member

Choose a reason for hiding this comment

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

Please avoid using no/preserve/etc, mostly such names are very misleading, let's use sort: boolean, by default true and when it is false we will do nothing

@alexander-akait
Copy link
Member

Looks like some tests are failed, can you look?

@ezzak
Copy link
Contributor Author

ezzak commented Mar 16, 2025

Tests/presets were broken because by default an empty option object is passed to plugins, and default preset was not passing {sort: true}. Fixed.

@ludofischer ludofischer merged commit 2e5a24f into cssnano:master Mar 18, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants