Skip to content

Commit b5dd621

Browse files
optimized grid and added XXL breakpoint
1 parent f6bf48c commit b5dd621

File tree

4 files changed

+35
-19
lines changed

4 files changed

+35
-19
lines changed

src/Layout/Grid/Grid.scss

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,27 @@
3535
}
3636
}
3737
}
38+
// Default Grid System
39+
@for $id from 1 through variables('grid', 'columns', 'size') {
40+
.#{class('grid', 'column')}-#{$id} {
41+
grid-column: span #{$id};
42+
}
43+
}
44+
// Breakpoints
3845
@each $label, $breakpoint in $viewports {
3946
@include breakpoints($breakpoint) {
4047
@for $id from 1 through variables('grid', 'columns', 'size') {
41-
.#{class('grid', 'column')}-#{$id},
4248
.#{class('grid', 'column')}-#{$label}-#{$id} {
4349
grid-column: span #{$id};
4450
}
45-
/// Offset
46-
@if options('grid', 'features', 'offset') {
51+
}
52+
}
53+
}
54+
// Offset
55+
@if options('grid', 'features', 'offset') {
56+
@each $label, $breakpoint in $viewports {
57+
@include breakpoints($breakpoint) {
58+
@for $id from 1 through variables('grid', 'columns', 'size') {
4759
@for $offset-id from 2 through variables('grid', 'columns', 'size') {
4860
.#{class('grid', 'column')}-#{$label}-#{$id}.#{class('grid', 'offset')}-#{$label}-#{$offset-id} {
4961
grid-column: #{$offset-id} / span #{$id};

src/Layout/Grid/variables.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ $viewports: (
1111
(class('grid', 'small'), variables('grid', 'breakpoints', 'small')),
1212
(class('grid', 'medium'), variables('grid', 'breakpoints', 'medium')),
1313
(class('grid', 'large'), variables('grid', 'breakpoints', 'large')),
14-
(class('grid', 'extra-large'), variables('grid', 'breakpoints', 'extra-large'))
14+
(class('grid', 'extra-large'), variables('grid', 'breakpoints', 'extra-large')),
15+
(class('grid', 'extra-extra-large'), variables('grid', 'breakpoints', 'extra-extra-large'))
1516
);

src/classnames.scss

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,17 @@ $classnames: (
165165
/////////////////////////////////////////////////////////
166166
/// Layout
167167
'grid': (
168-
'row' : 'row',
169-
'container' : 'container',
170-
'column' : 'col',
171-
'offset' : 'offset',
172-
'equal' : 'equal',
173-
'extra-small': 'xs',
174-
'small' : 'sm',
175-
'medium' : 'md',
176-
'large' : 'lg',
177-
'extra-large': 'xl',
168+
'row' : 'row',
169+
'container' : 'container',
170+
'column' : 'col',
171+
'offset' : 'offset',
172+
'equal' : 'equal',
173+
//
174+
'extra-small' : 'xs',
175+
'small' : 'sm',
176+
'medium' : 'md',
177+
'large' : 'lg',
178+
'extra-large' : 'xl',
179+
'extra-extra-large' : 'xxl'
178180
),
179181
)

src/options.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ $options: (
2727
'margin' : 0 auto
2828
),
2929
'breakpoints': (
30-
'extra-small': 0,
31-
'small' : 500px,
32-
'medium' : 768px,
33-
'large' : 992px,
34-
'extra-large': 1260px
30+
'extra-small' : 0,
31+
'small' : 500px,
32+
'medium' : 768px,
33+
'large' : 992px,
34+
'extra-large' : 1260px,
35+
'extra-extra-large' : 1400px
3536
)
3637
)
3738
),

0 commit comments

Comments
 (0)