diff --git a/src/wmcads/components/content-card/_content-card.njk b/src/wmcads/components/content-card/_content-card.njk index 758fae6e..848bfb33 100755 --- a/src/wmcads/components/content-card/_content-card.njk +++ b/src/wmcads/components/content-card/_content-card.njk @@ -7,23 +7,23 @@ {# HTML content #} {% set html = params.html if params.html else "
-

Where the adventure starts

-

Whatever your plans this holiday, get there with our great range of family tickets and discount vouchers.

+

Lorem ipsum dolor sit amet

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

" %} {# This macro checks if it's being called inside a {% call %} tag #} {# It's an easier way to pass in larger html content #} -<{{tag}}{{attributes | safe}} class="wmcads-content-card{{" blue" if params.isCta else "" }}"> +<{{tag}}{{attributes | safe}} class="wmcads-content-card{{"--blue" if params.isCta else "" }}"> {% if(params.src) %} - content image + content image {% endif %} {% if(params.isCta) %}
-

Where the adventure starts

+

Lorem ipsum dolor sit amet

{% else %} {%- if caller -%} diff --git a/src/wmcads/components/content-card/_content-card.scss b/src/wmcads/components/content-card/_content-card.scss index b963fb0c..9b8ecca7 100755 --- a/src/wmcads/components/content-card/_content-card.scss +++ b/src/wmcads/components/content-card/_content-card.scss @@ -1,3 +1,15 @@ +//accessibility styles +@mixin accessibility-hover { + h2 { + text-decoration: underline; + } + + &:hover, + &:focus { + box-shadow: inset 0 0 0 1px get-color(primary); + } +} + .wmcads-content-card { display: block; min-height: 150px; @@ -6,15 +18,29 @@ background-color: $white; text-decoration: none; - svg { - width: 60px; - height: 60px; - fill: $white; + @at-root a#{&} { + display: block; + color: get-color(text); + text-decoration: none; + @include accessibility-hover; + } + + // Modifiers + &--blue { + display: block; + border-bottom: 0; + color: $white; + background: get-color(cta); + + h2 { + color: $white; + } + + svg { + width: 60px; + height: 60px; + fill: $white; + } } -} -.wmcads-content-card.blue { - border-bottom: 0; - color: $white; - background: get-color(cta); }