More Mixins

This commit is contained in:
reverend 2020-08-23 11:37:22 +02:00
parent 598c5de027
commit beb5a32d29

View File

@ -1,3 +1,33 @@
@mixin RV-ContentCrop--bottom {
img {
object-position: botom;
}
}
@mixin RV-ContentCrop--top {
img {
object-position: top;
}
}
@mixin RV-ContentCrop--right {
img {
object-position: right;
}
}
@mixin RV-ContentCrop--left {
img {
object-position: left;
}
}
@mixin RV-ContentCrop--center {
img {
object-position: center;
}
}
@mixin RV-ContentCrop{ @mixin RV-ContentCrop{
&,* { &,* {
overflow: hidden; overflow: hidden;
@ -5,34 +35,29 @@
} }
img { img {
width: inherit; width: 100%;
height: inherit; height: 100%;
object-fit: cover; object-fit: cover;
object-position: center;
} }
&--left { &--left {
img { @include RV-ContentCrop--left;
object-position: left;
}
} }
&--right { &--center {
img { @include RV-ContentCrop--center;
object-position: right;
}
} }
&--top { &--top {
img { @include RV-ContentCrop--top;
object-position: top;
}
} }
&--bottom { &--bottom {
img { @include RV-ContentCrop--bottom;
object-position: bottom;
} }
&--center {
@include RV-ContentCrop--center;
} }
} }