scss-library/components/01_Layouts/fan/_fan.scss

69 lines
1.8 KiB
SCSS
Raw Normal View History

2020-12-27 16:00:24 +01:00
@mixin RV-Fan--horizontal($-base_height, $-base_width, $-prefix: '&', $-suffix: '') {
2020-08-21 17:51:22 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Container#{$-suffix} {
flex-direction: row;
}
#{$-prefix}__Container#{$-suffix} #{$-prefix}__Surface {
min-width: $-base_width;
height: $-base_height;
}
2020-08-23 14:39:45 +02:00
}
2020-08-21 17:51:22 +02:00
2020-12-27 16:00:24 +01:00
@mixin RV-Fan--vertical($-base_height, $-base_width, $-prefix: '&', $-suffix: '') {
#{$-prefix}__Container#{$-suffix} {
flex-direction: column;
width: max-content;
}
2020-08-23 11:35:03 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Container#{$-suffix} #{$-prefix}__Surface {
width: $-base_width;
min-height: $-base_height;
}
2020-08-23 14:39:45 +02:00
}
2020-08-23 11:35:03 +02:00
2020-12-27 16:00:24 +01:00
@mixin RV-Fan--auto($-base_height, $-base_width, $-prefix: '&', $-suffix: '') {
2020-08-23 14:39:45 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Container#{$-suffix} {
flex-flow: row wrap;
}
2020-08-23 14:39:45 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Container#{$-suffix} #{$-prefix}__Surface {
width: calc(100% - #{$-base_width});
min-width: $-base-width;
height: $-base_height;
}
2020-08-23 14:39:45 +02:00
}
2020-12-27 16:00:24 +01:00
@mixin RV-Fan--fullWidth($-base_height, $-base_width, $-prefix: '&', $-suffix: '') {
#{$-prefix}__Container#{$-suffix} #{$-prefix}__Base,
#{$-prefix}__Container#{$-suffix} #{$-prefix}__Surface {
flex-grow: 1;
}
2020-08-23 14:39:45 +02:00
}
2020-08-23 11:35:03 +02:00
2020-12-27 16:00:24 +01:00
@mixin RV-Fan ($-base_height, $-base_width, $-prefix: '&') {
@include RV-Fan--vertical($-base_height, $-base_width, $-prefix, '--vertical');
@include RV-Fan--horizontal($-base_height, $-base_width, $-prefix, '--horizontal');
@include RV-Fan--auto($-base_height, $-base_width, $-prefix, '--auto');
@include RV-Fan--fullWidth($-base_height, $-base_width, $-prefix, '--fullWidth');
2020-08-23 14:39:45 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Container {
display: flex;
}
2020-08-23 11:35:03 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Base {
height: $-base_height;
width: $-base_width;
flex: 0 0 auto;
}
2020-08-23 14:39:45 +02:00
2020-12-27 16:00:24 +01:00
#{$-prefix}__Surface {
@include RV-ContentCrop;
}
2020-08-21 17:51:22 +02:00
}
.RV-Fan {
2020-12-27 16:00:24 +01:00
@include RV-Fan(280px, 320px);
2020-08-21 17:51:22 +02:00
}