From 87f05f3e82aa772e9cdc1d4e13c588b12472cc5c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 17 Oct 2018 19:45:44 +0200 Subject: [PATCH] consolidate media-frame usage --- src/components/Post/PostImage.module.scss | 18 ------------------ src/components/atoms/Image.jsx | 4 ++-- src/components/molecules/Featured.module.scss | 8 -------- .../molecules/RelatedPosts.module.scss | 10 +++++----- src/templates/Page.jsx | 2 +- 5 files changed, 8 insertions(+), 34 deletions(-) diff --git a/src/components/Post/PostImage.module.scss b/src/components/Post/PostImage.module.scss index 2e0755bb..8f90d3ee 100644 --- a/src/components/Post/PostImage.module.scss +++ b/src/components/Post/PostImage.module.scss @@ -30,33 +30,15 @@ margin-top: $spacer * 1.5; margin-bottom: $spacer * 1.5; - > div { - @include media-frame(); - - border-radius: 0; - - @media (min-width: $screen-sm) { - border-radius: $border-radius; - } - } - a & { position: relative; display: block; } a:hover & { - > div { - border-color: $link-color !important; - } - .postImageTitle { opacity: 1; transform: translate3d(0, 0, 0); } } - - img { - border-radius: 0; - } } diff --git a/src/components/atoms/Image.jsx b/src/components/atoms/Image.jsx index c9889c00..dc6fce7a 100644 --- a/src/components/atoms/Image.jsx +++ b/src/components/atoms/Image.jsx @@ -6,8 +6,8 @@ import styles from './Image.module.scss' const Image = ({ fluid, fixed, alt }) => ( div { - @include media-frame(); - } - &:hover, &:focus { - > div { - border-color: $link-color !important; - } - .featuredTitle { opacity: 1; transform: translate3d(0, 0, 0); diff --git a/src/components/molecules/RelatedPosts.module.scss b/src/components/molecules/RelatedPosts.module.scss index 7eae1b78..546745bb 100644 --- a/src/components/molecules/RelatedPosts.module.scss +++ b/src/components/molecules/RelatedPosts.module.scss @@ -39,19 +39,19 @@ } } + img { + margin-bottom: 0; + } + a { display: block; > div { - @include media-frame; + margin-bottom: 0; } &:hover, &:focus { - > div { - border-color: $link-color; - } - h4 { color: $link-color; } diff --git a/src/templates/Page.jsx b/src/templates/Page.jsx index d0395275..0d7904aa 100644 --- a/src/templates/Page.jsx +++ b/src/templates/Page.jsx @@ -16,7 +16,7 @@ const Page = ({ title, location, section, children }) => { Page.propTypes = { title: PropTypes.string.isRequired, children: PropTypes.any.isRequired, - section: PropTypes.object, + section: PropTypes.string, location: PropTypes.object }