Skip to content

Commit 4a45d09

Browse files
author
Irene
committed
Fix only centering points table's cell text
Also tweak some coloring
1 parent 2d05126 commit 4a45d09

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

app/assets/stylesheets/main.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,23 @@ table {
176176

177177
table > * > tr > td {
178178
padding: 6px 14px 6px 14px;
179-
text-align: center;
180179
}
181180

182181
table > * > tr > th {
183182
padding: 6px 4px 6px 4px;
184183
border: 0;
184+
}
185+
186+
table.points > * > tr > th {
185187
text-align: center;
186188
max-width: 5rem;
187189
word-wrap: break-word;
188190
}
189191

192+
table.points > * > tr > td {
193+
text-align: center;
194+
}
195+
190196
tr.table-totals > td {
191197
font-weight: bold;
192198
}

app/assets/stylesheets/points.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import "_breadcrumb";
2+
13
.course-point-header {
24
display: flex;
35
justify-content: space-around;
@@ -6,7 +8,7 @@
68
}
79

810
.point-cell {
9-
border: 1px solid black;
11+
border: 1px solid darken($breadcrumb-grey, 5%);
1012
}
1113

1214
.points-container {

app/views/points/index.html.erb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
<tr class="table-totals">
3131
<td>-</td>
3232
<% nstudents = @summary[:users].length %>
33-
<td><%= nstudents %></td>
34-
<% if @user_fields %>
35-
<td colspan="<%= @user_fields.length %>"></td>
36-
<% end %>
33+
<td colspan="<%= (@user_fields ? @user_fields.length : 0) + 1 %>"><%= nstudents %></td>
3734
<% @summary[:sheets].each do |sheet| %>
3835
<td>
3936
<%= "#{sheet[:total_awarded]}/#{sheet[:total_available]*nstudents}" %>

0 commit comments

Comments
 (0)