amis/packages/amis-ui/scss/helper/grid/_auto-columns.scss

39 lines
846 B
SCSS
Raw Normal View History

2020-12-10 16:49:59 +08:00
/*!markdown
---
title: Grid Auto Columns
2020-12-10 16:49:59 +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 + ':'));
}
}