summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GradeBook.scss83
1 files changed, 29 insertions, 54 deletions
diff --git a/GradeBook.scss b/GradeBook.scss
index 175e1c5..dfa25d5 100644
--- a/GradeBook.scss
+++ b/GradeBook.scss
@@ -30,6 +30,22 @@ $table_hover_bg: #ffeebb;
$controls_bg: #dddddd;
// --------- Color definitions end -------------------
+// --------- Mixing definitions start -------------------
+@mixin gradestable_td($name, $clr) {
+ &.#{$name} {
+ background-color: $clr;
+ &:hover {
+ background-color: $table_hover_bg;
+ }
+ }
+}
+@mixin gradestable_th($name, $clr) {
+ &.#{$name} {
+ background-color: darken($clr,15%);
+ }
+}
+// --------- Mixing definitions end -------------------
+
body {
padding: $body_padding;
margin: $body_margin;
@@ -111,6 +127,7 @@ body {
table.gradestable {
border: 1px solid black;
border-collapse: collapse;
+ background-color: $normal_bg;
tr {
&:hover {
background-color: $table_hover_bg;
@@ -119,62 +136,20 @@ body {
th {
font-weight: bold;
background-color: $normal_bg;
- &.Quiz {
- background-color: darken($Quiz,15%);
- }
- &.Homework {
- background-color: darken($Homework,15%);
- }
- &.LabReport {
- background-color: darken($LabReport,15%);
- }
- &.MidTerm {
- background-color: darken($MidTerm,15%);
- }
- &.FinalExam {
- background-color: darken($FinalExam,15%);
- }
- &.unset {
- background-color: darken($Unset,15%);
- }
+ @include gradestable_th(Quiz, $Quiz);
+ @include gradestable_th(Homework, $Homework);
+ @include gradestable_th(LabReport, $LabReport);
+ @include gradestable_th(MidTerm, $MidTerm);
+ @include gradestable_th(FinalExam, $FinalExam);
+ @include gradestable_th(unset, $Unset);
}
td {
- &.Quiz {
- background-color: $Quiz;
- &:hover {
- background-color: $table_hover_bg;
- }
- }
- &.Homework {
- background-color: $Homework;
- &:hover {
- background-color: $table_hover_bg;
- }
- }
- &.LabReport {
- background-color: $LabReport;
- &:hover {
- background-color: $table_hover_bg;
- }
- }
- &.MidTerm {
- background-color: $MidTerm;
- &:hover {
- background-color: $table_hover_bg;
- }
- }
- &.FinalExam {
- background-color: $FinalExam;
- &:hover {
- background-color: $table_hover_bg;
- }
- }
- &.unset {
- background-color: $Unset;
- &:hover {
- background-color: $table_hover_bg;
- }
- }
+ @include gradestable_td(Quiz, $Quiz);
+ @include gradestable_td(Homework, $Homework);
+ @include gradestable_td(LabReport, $LabReport);
+ @include gradestable_td(MidTerm, $MidTerm);
+ @include gradestable_td(FinalExam, $FinalExam);
+ @include gradestable_td(unset, $Unset);
}
}
}