From beb5a32d29abf0ecb845c410ab82c110d4442b4b Mon Sep 17 00:00:00 2001 From: reverend Date: Sun, 23 Aug 2020 11:37:22 +0200 Subject: [PATCH] More Mixins --- .../01_Layouts/contentCrop/_contentCrop.scss | 57 +++++++++++++------ 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/components/01_Layouts/contentCrop/_contentCrop.scss b/components/01_Layouts/contentCrop/_contentCrop.scss index 2364f30..7a2ec2f 100644 --- a/components/01_Layouts/contentCrop/_contentCrop.scss +++ b/components/01_Layouts/contentCrop/_contentCrop.scss @@ -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{ &,* { overflow: hidden; @@ -5,34 +35,29 @@ } img { - width: inherit; - height: inherit; + width: 100%; + height: 100%; object-fit: cover; - object-position: center; } &--left { - img { - object-position: left; - } + @include RV-ContentCrop--left; } - &--right { - img { - object-position: right; - } + &--center { + @include RV-ContentCrop--center; } &--top { - img { - object-position: top; - } + @include RV-ContentCrop--top; } &--bottom { - img { - object-position: bottom; - } + @include RV-ContentCrop--bottom; + } + + &--center { + @include RV-ContentCrop--center; } }