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

PropertySortOrder: use separate_groups without order #893

Open
davidenke opened this issue Mar 16, 2017 · 3 comments
Open

PropertySortOrder: use separate_groups without order #893

davidenke opened this issue Mar 16, 2017 · 3 comments

Comments

@davidenke
Copy link

The documentation hints, that

separate_groups is only enforced if a custom order is specified via the order option.

It would be nice, if separate_groups used without order would enforce a capsulated order of groups. Every group would be sorted independently (alphabetically by default).

For example this:

video {
      height: auto;
      left: 50%;
      min-height: 100%;
      min-width: 100%;
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: auto;
}

would become this:

video {
      height: auto;
      min-height: 100%;
      min-width: 100%;
      width: auto;
      
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
}

or this:

video {
      min-height: 100%;
      min-width: 100%;

      height: auto;
      width: auto;

      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
}
@davidenke davidenke changed the title PropertySortOrder use separate_groups without order PropertySortOrder: use separate_groups without order Mar 16, 2017
@trotzig
Copy link
Contributor

trotzig commented Mar 16, 2017

It would be nice, if separate_groups used without order would enforce a capsulated order of groups.

I'm not sure I understand this suggestion. How would we know what to put in what group without specifying it through the order?

@davidenke
Copy link
Author

Okay, I'll try to improve the explanation:

Per default ungrouped properties are sorted alphabetically. If you now insert a blank line the properties are splitted in two groups (as from the view of the editor) and the order has to remain alphabetically for all properties.

The suggestion is, that both property groups are now sorted indepent alphabetically, if the separate_groups option is used without the order option.

But maybe this suggestion should use a new option...

@trotzig
Copy link
Contributor

trotzig commented Mar 17, 2017

Ah, I see what you mean now. Arbitrary groups with alphabetic ordering enforced within the groups. I don't think this is possible with the current implementation. I'm happy to accept a PR though.

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

No branches or pull requests

3 participants