// --------- Color definitions start ------------------- $body_bg: #336699; $body_padding: 0px; $body_margin: 0px; $body_font_family: Sans-Serif; $on_hover_lighting: 5%; $link_color_cmd_normal: black; $link_color_cmd_visited: $link_color_cmd_normal; $link_color_cmd_hover: $link_color_cmd_normal; $link_color_cmd_active: $link_color_cmd_normal; $normal_bg: #ffcc99; $normal_fg: black; $div_padding: 5px; $div_margin_vert: 15px; $div_margin_horiz: 5px; $div_bg_color: $normal_bg; $errormsg_bg: #ff0000; $infomsg_bg: #ffccff; $attention_bg: #8f0000; $attention_fg: white; $Quiz: #CFECEC; $Homework: #C3FDB8; $LabReport: #82CAFA; $MidTerm: #f0b7f0; $FinalExam: #f08ab6; $Participation: #cccc99; $LogBook: #00e6ac; $Presentation: #00ccff; $Unset: #cccccc; $Deleted: #aaaaaa; $table_hover_bg: lighten($normal_bg, $on_hover_lighting); $controls_bg: #dddddd; $col_controls_bg: #dddddd; $col_controls_fg: black; $col_controls_dangerous_bg: red; $col_controls_dangerous_fg: black; // --------- Color definitions end ------------------- // --------- Mixing definitions start ------------------- @mixin gradestable_td($name, $clr) { &.#{$name} { background-color: $clr; &:hover { background-color: lighten($clr, $on_hover_lighting); } } } @mixin gradestable_th($name, $clr) { &.#{$name} { background-color: darken($clr,15%); } } @mixin col_control($name, $fg, $bg) { span.column_control_#{$name} { font-weight: bold; background-color: $bg; color: $fg; } } // --------- Mixing definitions end ------------------- body { padding: $body_padding; margin: $body_margin; background-color: $body_bg; color: $normal_fg; font-family: $body_font_family; a { color: $link_color_cmd_normal; text-decoration: none; &:visited { color: $link_color_cmd_visited; } &:hover { color: $link_color_cmd_hover; text-decoration:underline; background-color: lighten($controls_bg,20%); } &:active { color: $link_color_cmd_active; text-decoration:underline; background-color: lighten($controls_bg,20%); } } div { background-color: $div_bg_color; color: $normal_fg; padding: { top: $div_padding; bottom: $div_padding; left: $div_padding; right: $div_padding; } margin: { top: $div_margin_vert; bottom: $div_margin_vert; left: $div_margin_horiz; right: $div_margin_horiz; } } span.controls { background-color: $controls_bg; font-weight: bold; } @include col_control(sort, $col_controls_fg, $col_controls_bg); @include col_control(userhidecolumn, $col_controls_fg, $col_controls_bg); @include col_control(deletecolumn, $col_controls_dangerous_fg, $col_controls_dangerous_bg); @include col_control(changegrades, $col_controls_fg, $col_controls_bg); @include col_control(unhidecolfromstudents, $col_controls_fg, white); @include col_control(hidecolfromstudents, $col_controls_fg, $col_controls_bg); @include col_control(changecolumn, $col_controls_fg, $col_controls_bg); div.changegrades { background-color: $attention_bg; color: $attention_fg; padding: { bottom: $div_padding; top: $div_padding; left: $div_padding; right: $div_padding; } } div.errormsg { background-color: $errormsg_bg; } div.infomsg { background-color: $infomsg_bg; } span.login_info { font-weight: bold; } div.header { padding: $div_padding*4; text-align: left; font-family: Sans-Serif; h1 { font-size: 200%; font-weight: bold; } h2 { font-size: 150%; font-weight: normal; } h3 { font-size: 120%; font-weight: normal; } p.date { font-size: 150%; font-weight: normal; } } div.gradestable { background-color: $body_bg; } table.gradestable { // border: thin solid black; // border-collapse: collapse; background-color: $normal_bg; thead { top: 0; position: sticky; } tr { &:hover { background-color: $table_hover_bg; border-bottom: medium solid black; border-top: medium solid black; } td { @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(Participation, $Participation); @include gradestable_td(Presentation, $Presentation); @include gradestable_td(LogBook, $LogBook); @include gradestable_td(unset, $Unset); @include gradestable_td(deleted, $Deleted); } } th { font-weight: bold; background-color: $normal_bg; vertical-align: top; @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(Participation, $Participation); @include gradestable_th(Presentation, $Presentation); @include gradestable_th(LogBook, $LogBook); @include gradestable_th(unset, $Unset); @include gradestable_th(deleted, $Deleted); } } } /* * print styles */ @media print { * { background-color: white !important; background-image: none !important; } div.controls { display: none; } div.greetings { display: none; } div.footer { display: none; } div.gradestable { table.gradestable { th { font-weight: bold; vertical-align: top; } } a[href]:after { content:none; } a img { display: none; } } } // vim: ts=2:sw=2:tw=74:fdm=indent