From 7578bbcf0be67d8562ab29bd94a005984ceb71b5 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 2 Jun 2020 11:10:09 +0100 Subject: [PATCH] Fix paragraphs with reversed-out text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since these two paragraphs sit on a blue background, they should have white text. But this was getting overridden when the `govuk-body` class was added in a previous commit, and the paragraphs appeared with black text. Previously these paragraphs were inheriting their colour from a parent element. But a class applied directly to the element is more specific. So this commit fixes the problem by being more specific again, by applying the colour to the element, in the context of it’s parent’s class. --- app/assets/stylesheets/components/banner.scss | 1 + app/assets/stylesheets/views/product-page.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss index 5138747fa..8203dcfd2 100644 --- a/app/assets/stylesheets/components/banner.scss +++ b/app/assets/stylesheets/components/banner.scss @@ -82,6 +82,7 @@ margin-top: 0; margin-bottom: govuk-spacing(6); + color: $white; &:last-child { margin-bottom: 0; diff --git a/app/assets/stylesheets/views/product-page.scss b/app/assets/stylesheets/views/product-page.scss index d1de13f70..a81b77c36 100644 --- a/app/assets/stylesheets/views/product-page.scss +++ b/app/assets/stylesheets/views/product-page.scss @@ -36,6 +36,7 @@ $button-shadow-size: $govuk-border-width-form-element; p { @include core-24; + color: $white; margin: govuk-spacing(3) 0 govuk-spacing(6); }