.gem-c-image-card { @include govuk-clearfix; @include govuk-text-colour; margin: 0 (- govuk-spacing(3)) govuk-spacing(6) (- govuk-spacing(3)); position: relative; } .gem-c-image-card__image-wrapper { @include govuk-grid-column($width: one-third, $at: mobile); @include govuk-grid-column($width: full, $at: tablet); margin: 0; @include govuk-media-query($from: tablet) { margin-bottom: govuk-spacing(2); } + .gem-c-image-card__text-wrapper { @include govuk-media-query($until: tablet) { padding-left: 0; } } } .gem-c-image-card__image { display: block; max-width: 100%; } .gem-c-image-card__text-wrapper { @include govuk-grid-column($width: two-thirds, $at: mobile); @include govuk-grid-column($width: full, $at: tablet); } .gem-c-image-card__title { @include govuk-font(19, $weight: bold); margin: 0; } .gem-c-image-card__title-link { @extend %govuk-link; text-decoration: none; &:hover { text-decoration: underline; } &:focus { text-decoration: none; } // the after element extends the link to cover the image, removing the // need for a duplicate link. Other elements apart from the image are given // position relative and a higher z-index to put them above the after element &:after { content: ""; position: absolute; z-index: 1; top: 0; left: govuk-spacing(3); right: govuk-spacing(3); height: 100%; $ie-background: rgba(255, 255, 255, 0); background: $ie-background; // because internet explorer } } .gem-c-image-card__context, .gem-c-image-card__metadata, .gem-c-image-card__description { position: relative; z-index: 2; } .gem-c-image-card__context, .gem-c-image-card__metadata { @include govuk-font(14); margin: 0 0 (govuk-spacing(3) / 2); color: govuk-colour("dark-grey", $legacy: "grey-1"); @include govuk-media-query($from: tablet) { margin-bottom: 0; } } .gem-c-image-card__description { @include govuk-font($size: 16); padding-top: (govuk-spacing(3) / 2); word-wrap: break-word; } .gem-c-image-card__list { @include govuk-font($size: 16); position: relative; z-index: 2; padding: (govuk-spacing(3) / 2) 0 0 0; margin: 0; list-style: none; .gem-c-image-card__list-item-link { @extend %govuk-link; } &.gem-c-image-card__list--indented { padding-left: govuk-spacing(3); .gem-c-image-card__list-item { position: relative; &:before { content: "-"; position: absolute; left: (- govuk-spacing(3)); } } } } .gem-c-image-card--large.gem-c-image-card { margin: 0 0 govuk-spacing(6) 0; } .gem-c-image-card--large { .gem-c-image-card__image-wrapper { @include govuk-grid-column($width: two-thirds, $at: tablet); margin-bottom: govuk-spacing(2); float: none; width: auto; max-width: 100%; padding: 0; @include govuk-media-query($from: tablet) { padding: 0 govuk-spacing(2) 0 0; margin-bottom: 0; } } .gem-c-image-card__text-wrapper { @include govuk-grid-column($width: one-third, $at: tablet); padding: 0; overflow: hidden; @include govuk-media-query($from: tablet) { padding: 0 govuk-spacing(3); margin-bottom: 0; } } .gem-c-image-card__title { @include govuk-font(24, $weight: bold); padding-bottom: govuk-spacing(2); } .gem-c-image-card__title-link { &:after { left: 0; right: 0; } } .gem-c-image-card__description { @include govuk-font(19); } }