From 7d4d3f99ff02a44de92aaf249e589c457adee733 Mon Sep 17 00:00:00 2001
From: Kevin Lin <kevinl@cs.uw.edu>
Date: Sat, 4 Jul 2020 15:54:32 -0700
Subject: [PATCH] _sass: Apply padding to card root rather than descendants

---
 _sass/custom/announcement.scss |  7 -------
 _sass/custom/card.scss         | 16 +++-------------
 _sass/custom/custom.scss       |  5 +++++
 _sass/custom/module.scss       |  6 ++----
 4 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/_sass/custom/announcement.scss b/_sass/custom/announcement.scss
index ce5fd9f..3f1403c 100644
--- a/_sass/custom/announcement.scss
+++ b/_sass/custom/announcement.scss
@@ -3,16 +3,9 @@
 }
 
 .announcement-header {
-  @extend %card-header;
 }
 
 .announcement-body {
-  @extend %card-body;
-
-  h1, h2, h3, h4, h5, h6 {
-    display: flex;
-    align-items: center;
-  }
 }
 
 .announcement-meta {
diff --git a/_sass/custom/card.scss b/_sass/custom/card.scss
index 3466222..43e1d5b 100644
--- a/_sass/custom/card.scss
+++ b/_sass/custom/card.scss
@@ -13,6 +13,7 @@
   display: flex;
   flex-direction: column;
   min-width: 0;
+  padding: $sp-2 $sp-4 0;
   position: relative;
   word-wrap: break-word;
 
@@ -23,23 +24,12 @@
   >:first-child {
     border-top: none;
   }
-}
-
-%card-header {
-  padding: $sp-2 $sp-4;
 
-  p {
-    margin-bottom: $sp-2;
+  >:last-child {
+    border-bottom: none;
   }
 }
 
-%card-body {
-  @extend %card-header;
-
-  flex: 1 1 auto;
-  border-top: $border $border-color;
-}
-
 %card-meta {
   @extend .label;
   border-radius: $border-radius;
diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss
index 82e39ae..867bb85 100644
--- a/_sass/custom/custom.scss
+++ b/_sass/custom/custom.scss
@@ -27,6 +27,11 @@ details {
   margin-right: 40px;
 }
 
+h1, h2, h3, h4, h5, h6 {
+  align-items: center;
+  display: flex;
+}
+
 iframe,
 summary {
   max-width: 100%;
diff --git a/_sass/custom/module.scss b/_sass/custom/module.scss
index e853cef..a057233 100644
--- a/_sass/custom/module.scss
+++ b/_sass/custom/module.scss
@@ -2,16 +2,16 @@
   @extend %card;
 
   .module-days {
+    border-bottom: $border $border-color;
     border-top: $border $border-color;
     display: grid;
     grid-template-columns: max-content 1fr;
-    margin: 0;
+    margin: $sp-2 (-$sp-4);
 
     @include mq(lg) {
       grid-template-columns: 1fr 7fr;
     }
 
-
     .module-day,
     .module-event {
       margin: 0;
@@ -92,9 +92,7 @@
 }
 
 .module-header {
-  @extend %card-header;
 }
 
 .module-body {
-  @extend %card-body;
 }
-- 
GitLab