Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

feat(layout): allow flex-order to be negative #4592

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions src/core/services/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,11 @@
@if $suffix != null {
$selector: 'flex-order-#{$suffix}';
}
.#{$selector}-0 { order: 0; }
.#{$selector}-1 { order: 1; }
.#{$selector}-2 { order: 2; }
.#{$selector}-3 { order: 3; }
.#{$selector}-4 { order: 4; }
.#{$selector}-5 { order: 5; }
.#{$selector}-6 { order: 6; }
.#{$selector}-7 { order: 7; }
.#{$selector}-8 { order: 8; }
.#{$selector}-9 { order: 9; }
@for $i from -9 through 9 {
.#{$selector}-#{$i} {
order: #{$i};
}
}
}

@mixin layout-for-name($name) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/services/layout/layout.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('layout directives', function() {

var suffixes = ['sm', 'gt-sm', 'md', 'gt-md', 'lg', 'gt-lg'];
var directionValues = ['row', 'column'];
var flexOrderValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var flexOrderValues = [-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var flexValues = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 33, 34, 66, 67];
var offsetValues = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 33, 34, 66, 67];
var alignmentValues = [
Expand Down