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

Custom StyleSheet ordering? #310

Open
SrBrahma opened this issue Mar 2, 2022 · 1 comment
Open

Custom StyleSheet ordering? #310

SrBrahma opened this issue Mar 2, 2022 · 1 comment

Comments

@SrBrahma
Copy link

SrBrahma commented Mar 2, 2022

Hi, I have my tastes when ordering my StyleSheet styles props. Alphabetical order isn't good for me.

For example, I have +- at this order: flex stuff, width/height, margins, paddings, colors...

I am now doing it manually, but of course an automated way would be very nice.

What I suggest is having an array of the keys in the desired order, like ['flex', 'flexDirection', 'height', 'width']... This would be user-configurable, but I would be happy to set a default for it, if using the option to use it.

Any style in the StyleSheet not defined in that array wouldn't be sorted, or could be pushed down for an easier code.

@limpbrains
Copy link

Something like https://github.com/hudochenkov/postcss-sorting

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