Skip to content

Commit

Permalink
_sass: .card -> %card placeholder selector
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlin1 committed Jun 30, 2020
1 parent c6c01e3 commit d3dae9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions _sass/custom/announcement.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.announcement {
@extend .card;
@extend %card;
}

.announcement-body {
@extend .card-body;
@extend %card-body;

h1, h2, h3, h4, h5, h6 {
display: flex;
Expand All @@ -12,5 +12,5 @@
}

.announcement-meta {
@extend .card-meta, .text-grey-dk-100, .bg-grey-lt-200;
@extend %card-meta, .text-grey-dk-100, .bg-grey-lt-200;
}
11 changes: 6 additions & 5 deletions _sass/custom/card.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.card {
%card {
@include abstract-card();
display: flex;
flex-direction: column;
Expand All @@ -11,20 +11,21 @@
}
}

.card-header,
.card-body {
%card-header {
padding: $sp-2 $sp-4;

p {
margin-bottom: $sp-2;
}
}

.card-body {
%card-body {
@extend %card-header;

flex: 1 1 auto;
}

.card-meta {
%card-meta {
@extend .label;
border-radius: $border-radius;
padding-bottom: 0;
Expand Down
10 changes: 5 additions & 5 deletions _sass/custom/module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.module {
@extend .card;
@extend %card;

.module-days {
display: grid;
Expand Down Expand Up @@ -60,7 +60,7 @@
}

.label {
@extend .card-meta;
@extend %card-meta;
margin-left: 0;

&.label-hw-out {
Expand All @@ -79,13 +79,13 @@
}

.module-meta {
@extend .card-meta, .text-grey-dk-100, .bg-grey-lt-200;
@extend %card-meta, .text-grey-dk-100, .bg-grey-lt-200;
}

.module-header {
@extend .card-header;
@extend %card-header;
}

.module-body {
@extend .card-body;
@extend %card-body;
}

0 comments on commit d3dae9f

Please sign in to comment.