question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend sort-order, add option to sort specific mixins by name

See original GitHub issue

Example:

{ "sort-order": [ [ "$variable" ], [ "$include" ],  [ "$include foo-mixin" ],[ "top", "padding" ] ,  [ "$include bar-mixin" ]] }

Some mixins are useful to place after all declarations at the bottom of the rule.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:35 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
dkeeghancommented, Feb 23, 2015

I’ve found the use case like this:

.module {
    color: red;

    .child {
        color: blue;
    }

    @include bp(m) {
        color: yellow;

        .child {
            color: green;
        }
    }
}

Which is exported out as:

.module {
    color: red;

    @include bp(m) {
        color: yellow;

        .child {
            color: green;
        }
    }

    .child {
        color: blue;
    }
}

Which makes the child always blue and not green at the m breakpoint like I would expect.

Ideally I would love to be able to sort the selectors like:

property, @include (except bp), children, @include bp

0reactions
hudochenkovcommented, Feb 26, 2016

@SeBuDesign @Skoks you can use PostCSS plugin postcss-sorting which allow you to sort mixins by name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sorting an ArrayController backed by Ember-Data via ...
I'd like to be able to sort an ArrayController whose content arises from an ember-data query. Unfortunately, the sortProperty mixin doesn't seem ...
Read more >
Sort data using a custom list - Microsoft Support
In a column of a worksheet, type the values to sort by. Arrange them in the order that you want to define the...
Read more >
JavaScript Mixins | Commerce Frontend Development
The following is an example of a mixin that extends the target component with a function that introduces a new blockVisibility property to...
Read more >
Style Guide - Vue.js
This is the official style guide for Vue-specific code. ... Component names should always be multi-word, except for root App components, and built-in ......
Read more >
Grid/feature/Sort | Bryntum Gantt
true } }); // use initial sorting const · new ; 'name' } }); // can also be specified on the store const...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found