Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. /// list-sort
  2. /// Sort a SASS list
  3. /// @param $list - A SASS list
  4. /// @returns A sorted SASS list
  5. /// @requires function list-remove
  6. /// @author Jake Wilson <jake.e.wilson@gmail.com>
  7. @function list-sort($list) {
  8. $sortedlist: ();
  9. @while length($list) > 0 {
  10. $value: nth($list,1);
  11. @each $item in $list {
  12. @if $item < $value {
  13. $value: $item;
  14. }
  15. }
  16. $sortedlist: append($sortedlist, $value, 'space');
  17. $list: list-remove($list, index($list, $value));
  18. }
  19. @return $sortedlist;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement