Skip to content

Commit

Permalink
_sass: Reorganize module.scss selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlin1 committed Jun 26, 2020
1 parent fd77907 commit df32036
Showing 1 changed file with 62 additions and 74 deletions.
136 changes: 62 additions & 74 deletions _sass/custom/module.scss
Original file line number Diff line number Diff line change
@@ -1,105 +1,93 @@
.page-content .module {
.module {
@extend .card;

.module-days {
grid-template-columns: 1fr 4fr;

@include mq(lg) {
grid-template-columns: 1fr 7fr;
}
}

dl {
display: grid;
grid-template-columns: max-content 1fr;
}

dt {
font-weight: normal;
text-align: right;
margin: 0;

&::after {
content: ":";
@include mq(lg) {
grid-template-columns: 1fr 7fr;
}
}

dd {
font-weight: 500;
}
}

.module-week {
@extend .label, .text-grey-dk-100, .bg-grey-lt-200;
border-radius: $border-radius;
}

.module-header {
@extend .card-header;
}
.module-day,
.module-event {
margin: 0;
padding: $sp-2;

.module-body {
@extend .card-body;
}
@include mq(sm) {
padding: $sp-2 $sp-4;
}

dl.module-days {
margin: 0;
p {
display: inline-block;
margin: 0;
width: 100%;

.module-day,
.module-event {
margin: 0;
padding: $sp-2;
@include mq(sm) {
width: 62.5%;
}

@include mq(sm) {
padding: $sp-2 $sp-4;
+p {
width: auto;
}
}
}

p {
display: inline-block;
margin: 0;
width: 100%;
.module-day {
border-top: $border $border-color;
font-weight: normal;
grid-column-start: 1;
text-align: right;

@include mq(sm) {
width: 62.5%;
+.module-event {
border-top: $border $border-color;
}

+p {
width: auto;
&::after {
content: ":";
}
}
}

.module-day {
grid-column-start: 1;
border-top: $border $border-color;
.module-event {
font-weight: 500;
grid-column-start: 2;

+.module-event {
border-top: $border $border-color;
+.module-event {
padding-top: 0;
}
}
}

.module-event {
grid-column-start: 2;
.label {
border-radius: $border-radius;
margin-left: 0;
padding-bottom: 0;

+.module-event {
padding-top: 0;
}
}
&.label-hw-out {
@extend .label-yellow;
}

.label {
border-radius: $border-radius;
margin-left: 0;
padding-bottom: 0;
&.label-hw-due {
@extend .label-red;
}

&.label-hw-out {
@extend .label-yellow;
&.label-section {
@extend .label-purple;
}
}
}
}

&.label-hw-due {
@extend .label-red;
}
.module-week {
@extend .label, .text-grey-dk-100, .bg-grey-lt-200;
border-radius: $border-radius;
}

&.label-section {
@extend .label-purple;
}
}
.module-header {
@extend .card-header;
}

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

0 comments on commit df32036

Please sign in to comment.