// --------- Color definitions start ------------------- $body_bg: #336699; $body_padding: 0px; $body_margin: 20px; $body_font_family: Sans-Serif; $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; $errormsg_bg: #ff0000; $infomsg_bg: #ffccff; $attention_bg: #8f0000; $attention_fg: white; $Quiz: #CFECEC; $Homework: #C3FDB8; $LabReport: #82CAFA; $MidTerm: #f0b7f0; $FinalExam: #f08ab6; $Participation: #cccc99; $Unset: #cccccc; $table_hover_bg: #ffeebb; $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: $table_hover_bg; } } } @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: $normal_bg; 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; } } table.gradestable { border: 1px solid black; border-collapse: collapse; background-color: $normal_bg; tr { &:hover { background-color: $table_hover_bg; } } th { font-weight: bold; background-color: $normal_bg; valign: 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(unset, $Unset); } 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(unset, $Unset); } } } // vim: ts=2:sw=2:tw=74:fdm=indent