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

suggestion: wildcards to prevent re-ordering to affect the visual outcome #110

Open
bigmistqke opened this issue May 3, 2023 · 1 comment

Comments

@bigmistqke
Copy link

body {
  padding-top: 20px;
  padding: 0px 10px;
}

results in a different lay-out then

body {
  padding: 0px 10px;
  padding-top: 20px;
}

You could say the first example is just incorrect use of css (which is correct), but in my opinion that should not be the responsibility of this extension, and I am sure there are other edge cases in which order matters that are perfectly valid.

I propose to have a wild-card in properties-order, p.ex padding* (syntax open for debate) so you could do something like

{
  "properties-order": [
     "top",
     "padding*",
     "margin"
  ]
}

which would order

body {
  margin: 0px;
  padding-top: 20px;
  padding: 0px 10px;
  top: 0px;
}

into

body {
  top: 0px;
  padding-top: 20px;
  padding: 0px 10px;
  margin: 0px;
}

leaving the order of the paddings intact.

@hudochenkov
Copy link
Owner

I'm not sure what is the problem. What is config used in the original example?

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