From a5ea8a84f25d5e78446b62af835f38dc7d33e1d0 Mon Sep 17 00:00:00 2001 From: Ans Date: Thu, 13 Jun 2024 18:02:14 -0400 Subject: [PATCH] Properly BEMify m-inset--email --- cfgov/unprocessed/css/molecules/inset.less | 8 +++++++- cfgov/unprocessed/css/organisms/prefooter.less | 3 +++ .../v1/jinja2/v1/includes/organisms/full-width-text.html | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cfgov/unprocessed/css/molecules/inset.less b/cfgov/unprocessed/css/molecules/inset.less index d976c691b74..05dadf5f1ae 100644 --- a/cfgov/unprocessed/css/molecules/inset.less +++ b/cfgov/unprocessed/css/molecules/inset.less @@ -78,12 +78,18 @@ } &--email { + // This originally was a block, + // so we override the 30px margin added by .full-width-text-group .m-inset. + margin-bottom: unit( + @grid_gutter-width * 2 / @base-font-size-px, + em + ) !important; + // Tablet and above. .respond-to-min(@bp-sm-min, { box-sizing: border-box; width: 50%; padding-left: unit( @grid_gutter-width / @base-font-size-px, em ); - float: right; }); } } diff --git a/cfgov/unprocessed/css/organisms/prefooter.less b/cfgov/unprocessed/css/organisms/prefooter.less index 97412b69ca4..3ffe16df93a 100644 --- a/cfgov/unprocessed/css/organisms/prefooter.less +++ b/cfgov/unprocessed/css/organisms/prefooter.less @@ -3,6 +3,9 @@ // our atomic rules. .o-prefooter { + // Clear any floating m-inset that may be above this. + clear: both; + margin-top: unit(((@grid_gutter-width * 2) / @base-font-size-px), em); margin-bottom: 0; diff --git a/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html b/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html index f7e6b9ee02d..3981d00161b 100644 --- a/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html +++ b/cfgov/v1/jinja2/v1/includes/organisms/full-width-text.html @@ -36,7 +36,7 @@ {{ block | safe }} {% elif block_type in ['email_signup'] %} -
+