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

Allow order option to be function #64

Closed
alexander-akait opened this issue Sep 20, 2018 · 4 comments
Closed

Allow order option to be function #64

alexander-akait opened this issue Sep 20, 2018 · 4 comments

Comments

@alexander-akait
Copy link

Require to solve cssnano/cssnano#535, we should avoid to sort shorthand properties if long property will be defined above. Can we implement this asap?

@Siilwyn
Copy link
Owner

Siilwyn commented Oct 2, 2018

Can you explain your plan, how will it handle cssnano/cssnano#580 (comment)? Do you want to have a list of shorthand properties and use that while sorting?

@alexander-akait
Copy link
Author

@Siilwyn sort all properties, expect when shorthard after longhand and when longhand property after longhand with wrong order as in shorthanrd (i.e. border-width after border-style)

@Siilwyn
Copy link
Owner

Siilwyn commented Oct 2, 2018

Okay you would have to create a structure that contains the relation between those properties then. Looking forward to your idea. :)

I have temporarily put the order as a function in a branch so you can try it out with npm i siilwyn/css-declaration-sorter#sortorder-function

@alexander-akait
Copy link
Author

@Siilwyn Thanks 👍

Siilwyn added a commit that referenced this issue Dec 3, 2019
Siilwyn added a commit that referenced this issue Dec 12, 2019
Breaking changes:
No custom order JSON file can be provided anymore instead a function is 
expected.
The default sorting order is renamed to 'alphabetical'.

Closes #64
Siilwyn added a commit that referenced this issue Dec 16, 2019
Breaking changes:
No custom order JSON file can be provided anymore instead a function is 
expected.
The default sorting order is renamed to 'alphabetical'.

Closes #64
Siilwyn added a commit that referenced this issue Jun 28, 2020
Breaking changes:
No custom order JSON file can be provided anymore instead a function is 
expected.
The default sorting order is renamed to 'alphabetical'.

Closes #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants