From da47da9d6a7beac93b8eb12d339fd08c73623299 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Mon, 16 Mar 2020 16:19:03 +0700 Subject: [PATCH] fixed background size cover --- src/components/comment/CommentEmbedBlock/styles.scss | 3 ++- src/components/containers/CoverBackdrop/styles.scss | 3 ++- src/components/editors/VideoEditor/styles.scss | 3 ++- src/components/flow/Cell/styles.scss | 3 ++- src/components/flow/FlowRecent/styles.scss | 3 ++- src/components/profile/Message/styles.scss | 3 ++- src/containers/pages/ErrorNotFound/styles.scss | 3 ++- src/containers/profile/ProfileAvatar/styles.scss | 9 +++------ src/containers/profile/ProfileInfo/styles.scss | 3 ++- 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/components/comment/CommentEmbedBlock/styles.scss b/src/components/comment/CommentEmbedBlock/styles.scss index 60a84f91..2ff6b40e 100644 --- a/src/components/comment/CommentEmbedBlock/styles.scss +++ b/src/components/comment/CommentEmbedBlock/styles.scss @@ -3,7 +3,8 @@ height: $comment_height; width: 100%; box-sizing: border-box; - background: 50% 50% no-repeat/cover; + background: 50% 50% no-repeat; + background-size: cover; position: relative; display: flex; align-items: center; diff --git a/src/components/containers/CoverBackdrop/styles.scss b/src/components/containers/CoverBackdrop/styles.scss index 0e29b698..093c310a 100644 --- a/src/components/containers/CoverBackdrop/styles.scss +++ b/src/components/containers/CoverBackdrop/styles.scss @@ -4,7 +4,8 @@ height: 100%; top: 0; left: 0; - background: 50% 50% no-repeat/cover; + background: 50% 50% no-repeat; + background-size: cover; opacity: 0; transition: opacity 1s; diff --git a/src/components/editors/VideoEditor/styles.scss b/src/components/editors/VideoEditor/styles.scss index 77bd421a..35d1bc58 100644 --- a/src/components/editors/VideoEditor/styles.scss +++ b/src/components/editors/VideoEditor/styles.scss @@ -2,7 +2,8 @@ padding-top: 56.25%; position: relative; border-radius: $radius; - background: 50% 50% no-repeat/cover; + background: 50% 50% no-repeat; + background-size: cover; // background: darken($color: $content_bg, $amount: 2%); } diff --git a/src/components/flow/Cell/styles.scss b/src/components/flow/Cell/styles.scss index 88a50012..284204fd 100644 --- a/src/components/flow/Cell/styles.scss +++ b/src/components/flow/Cell/styles.scss @@ -8,7 +8,8 @@ position: relative; cursor: pointer; color: white; - background: 50% 50% no-repeat/cover $content_bg; + background: 50% 50% no-repeat $content_bg; + background-size: cover; .is_hero { .title { diff --git a/src/components/flow/FlowRecent/styles.scss b/src/components/flow/FlowRecent/styles.scss index ce85ed4c..f50d7fe8 100644 --- a/src/components/flow/FlowRecent/styles.scss +++ b/src/components/flow/FlowRecent/styles.scss @@ -26,7 +26,8 @@ .thumb { height: 48px; margin-right: $gap; - background: 50% 50% no-repeat/cover; + background: 50% 50% no-repeat; + background-size: cover; border-radius: $radius; flex: 0 0 48px; display: flex; diff --git a/src/components/profile/Message/styles.scss b/src/components/profile/Message/styles.scss index 2020ea88..27b991ca 100644 --- a/src/components/profile/Message/styles.scss +++ b/src/components/profile/Message/styles.scss @@ -55,7 +55,8 @@ $outgoing_color: $comment_bg; flex: 0 0 40px; border-radius: $radius; - background: 50% 50% no-repeat/cover; + background: 50% 50% no-repeat; + background-size: cover; // display: none; } diff --git a/src/containers/pages/ErrorNotFound/styles.scss b/src/containers/pages/ErrorNotFound/styles.scss index df1e4c1d..32005eec 100644 --- a/src/containers/pages/ErrorNotFound/styles.scss +++ b/src/containers/pages/ErrorNotFound/styles.scss @@ -18,7 +18,8 @@ align-items: center; justify-content: flex-start; box-sizing: border-box; - background: url('~/sprites/lost.svg') 50% 50% no-repeat/cover; + background: url('~/sprites/lost.svg') 50% 50% no-repeat; + background-size: cover; text-transform: uppercase; text-align: center; diff --git a/src/containers/profile/ProfileAvatar/styles.scss b/src/containers/profile/ProfileAvatar/styles.scss index 5eac9c5d..615a0ec6 100644 --- a/src/containers/profile/ProfileAvatar/styles.scss +++ b/src/containers/profile/ProfileAvatar/styles.scss @@ -4,7 +4,8 @@ border-radius: $radius; width: 100px; height: 100px; - background: $content_bg 50% 50% no-repeat/cover; + background: $content_bg 50% 50% no-repeat; + background-size: cover; position: absolute; bottom: 0; left: $gap; @@ -40,11 +41,7 @@ justify-content: flex-end; padding: $gap / 2; box-sizing: border-box; - background: linear-gradient( - 330deg, - $content_bg, - transparentize($content_bg, 1) - ); + background: linear-gradient(330deg, $content_bg, transparentize($content_bg, 1)); border-radius: $radius; svg { diff --git a/src/containers/profile/ProfileInfo/styles.scss b/src/containers/profile/ProfileInfo/styles.scss index f14f7f63..ef3b8bfe 100644 --- a/src/containers/profile/ProfileInfo/styles.scss +++ b/src/containers/profile/ProfileInfo/styles.scss @@ -13,7 +13,8 @@ border-radius: $radius; width: 100px; height: 100px; - background: $content_bg 50% 50% no-repeat/cover; + background: $content_bg 50% 50% no-repeat; + background-size: cover; position: absolute; bottom: 0; left: $gap;