From c8db707985327971a4bec2327eb6813df4d23307 Mon Sep 17 00:00:00 2001 From: Alison Joseph Date: Tue, 30 Jul 2019 09:45:23 -0500 Subject: [PATCH] fix: update icon sizing for resource cards (#273) * fix: update icon sizing for resource cards * chore: update image size styles * fix: add min width * chore: add min-height * add position static to gatsby image wrapper * chore: fix icon for real this time * chore: cleanup style order --- .gitignore | 3 ++- .../src/components/ResourceCard/resource-card.scss | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5262812ca..5572e2b60 100644 --- a/.gitignore +++ b/.gitignore @@ -69,4 +69,5 @@ yarn-error.log .yarn-integrity # Vscode settings -.vscode/settings.json \ No newline at end of file +.vscode/settings.json +.vscode/tasks.json \ No newline at end of file diff --git a/packages/gatsby-theme-carbon/src/components/ResourceCard/resource-card.scss b/packages/gatsby-theme-carbon/src/components/ResourceCard/resource-card.scss index c4f1eafbd..9740a5bb1 100644 --- a/packages/gatsby-theme-carbon/src/components/ResourceCard/resource-card.scss +++ b/packages/gatsby-theme-carbon/src/components/ResourceCard/resource-card.scss @@ -28,8 +28,10 @@ position: absolute; bottom: 1rem; left: 1rem; - width: 32px; + min-width: 32px; min-height: 32px; + display: flex; + align-items: flex-end; } .#{$prefix}--resource-card__icon--img .gatsby-resp-image-wrapper, @@ -38,6 +40,10 @@ margin-bottom: 0; } +.#{$prefix}--resource-card__icon--img .gatsby-resp-image-wrapper { + position: static !important; //important needed to override inline style added by Gatsby +} + .#{$prefix}--resource-card__icon--action { position: absolute; bottom: 1rem;