diff --git a/src/components/Organisms/EmailBanner/EmailBanner.js b/src/components/Organisms/EmailBanner/EmailBanner.js index 1dd234fee..8770f181d 100644 --- a/src/components/Organisms/EmailBanner/EmailBanner.js +++ b/src/components/Organisms/EmailBanner/EmailBanner.js @@ -101,7 +101,6 @@ const EmailBanner = ({ {title && ( diff --git a/src/components/Organisms/EmailBanner/EmailBanner.style.js b/src/components/Organisms/EmailBanner/EmailBanner.style.js index 70f76fab5..1c9be0161 100644 --- a/src/components/Organisms/EmailBanner/EmailBanner.style.js +++ b/src/components/Organisms/EmailBanner/EmailBanner.style.js @@ -92,6 +92,16 @@ const PrivacyCopyWrapper = styled.div` font-size: ${({ theme }) => theme.fontSize('xs')}; line-height: normal; padding-bottom: ${spacing('sm')}; + + /* Forces the descendants to inherit the same font size and line height here, + because contentful's WYSIWYG editor doesn't offer the particular text + styles we want here */ + & p, + & span, + & * { + font-size: inherit; + line-height: inherit; + } `; const SuccessCopyWrapper = styled.div` diff --git a/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap b/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap index d78f51182..351d1afb7 100644 --- a/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap +++ b/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap @@ -330,6 +330,13 @@ exports[`Image banner left orientation renders correctly 1`] = ` padding-bottom: 0.5rem; } +.c19 p, +.c19 span, +.c19 * { + font-size: inherit; + line-height: inherit; +} + .c20 { margin-top: 1rem; } @@ -1063,6 +1070,13 @@ exports[`Image banner renders correctly 1`] = ` padding-bottom: 0.5rem; } +.c19 p, +.c19 span, +.c19 * { + font-size: inherit; + line-height: inherit; +} + .c20 { margin-top: 1rem; } @@ -1796,6 +1810,13 @@ exports[`Text-only email widget renders correctly 1`] = ` padding-bottom: 0.5rem; } +.c19 p, +.c19 span, +.c19 * { + font-size: inherit; + line-height: inherit; +} + .c20 { margin-top: 1rem; } @@ -2529,6 +2550,13 @@ exports[`Text-only email widget with copyColor renders correctly 1`] = ` padding-bottom: 0.5rem; } +.c19 p, +.c19 span, +.c19 * { + font-size: inherit; + line-height: inherit; +} + .c20 { margin-top: 1rem; }