Skip to content

Placement of the unsorted rules #160

@kizu

Description

@kizu

Moved from the comments there to a separate issue.

We should provide a way of telling where the unsorted (or sorted using the fallback if we would have such) rules should go. I think that the best syntax for the job would be this:

{
  "sort-order": [
    [ "$variable" ],
    [ "position" ],
    [ "...", "border" ],
    [ "$include" ],
    [ "font"]
  ]
}

There is a special ... value — I think it is the easiest and most readable way of telling where to put everything (and it also is in par with my request for grouping properties).

This shouldn't be very different from the current behavior when we output everything that was not sorted at the end of the ruleset. We just need to remember the place where we should inject the unsorted rules and then inject all the unsorted (or sorted using the fallback) at that index. And the unsorted rules would be in its own group if it is in its own group in the sort-order, or glued together with something else if it is like this — [ "...", "border" ].

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions