2020-12-10 16:49:59 +08:00
|
|
|
/*!markdown
|
|
|
|
|
|
|
|
---
|
2020-12-22 14:58:36 +08:00
|
|
|
title: Grid Auto Columns
|
2020-12-10 16:49:59 +08:00
|
|
|
---
|
|
|
|
|
2020-12-22 14:58:36 +08:00
|
|
|
| Class | Properties |
|
|
|
|
| ----------- | ------------------------ |
|
|
|
|
| auto-cols-auto | grid-auto-columns: auto |
|
|
|
|
| auto-cols-min | grid-auto-columns: min-content |
|
|
|
|
| auto-cols-max | grid-auto-columns: max-content |
|
|
|
|
| auto-cols-fr | grid-auto-columns: minmax(0, 1fr) |
|
2020-12-10 16:49:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
*/
|
2020-11-26 19:43:32 +08:00
|
|
|
@mixin make-grid-auto-columns($prefix: '.') {
|
|
|
|
#{$prefix}auto-cols-auto {
|
|
|
|
grid-auto-columns: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
#{$prefix}auto-cols-min {
|
|
|
|
grid-auto-columns: min-content;
|
|
|
|
}
|
|
|
|
|
|
|
|
#{$prefix}auto-cols-max {
|
|
|
|
grid-auto-columns: max-content;
|
|
|
|
}
|
|
|
|
#{$prefix}auto-cols-fr {
|
|
|
|
grid-auto-columns: minmax(0, 1fr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include make-grid-auto-columns();
|
|
|
|
@each $deivce in map-keys($devices) {
|
|
|
|
@include media-device($deivce) {
|
|
|
|
@include make-grid-auto-columns('.' + selector-escape($deivce + ':'));
|
|
|
|
}
|
|
|
|
}
|