Skip to content

Commit 1424387

Browse files
authored
Merge branch 'master' into exercises-are-now-buttons
2 parents 3713ea1 + 50b8734 commit 1424387

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

lms/static/comments.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const FLAKE_COMMENTED_LINE_COLOR = '#fac4c3';
2-
const HOVER_LINE_STYLE = '1px solid #0d0d0f';
2+
const HOVER_LINE_COLOR = '#0d0d0f';
33

44

55
function removeMark(lineElement) {
@@ -20,13 +20,8 @@ function hoverLine(targets, hover) {
2020
const [lineTarget, addCommentTarget] = targets;
2121
if (lineTarget.dataset && lineTarget.dataset.vimbackground === 'true') {return;}
2222
const commentOpacity = (hover === true) ? '1' : '0';
23-
let parsedColor = hover;
24-
if (hover === true) {
25-
parsedColor = HOVER_LINE_STYLE;
26-
} else if (hover === false) {
27-
parsedColor = 'none';
28-
}
29-
lineTarget.style.border = parsedColor;
23+
const parsedColor = (hover === true) ? HOVER_LINE_COLOR : '';
24+
lineTarget.style.borderColor = parsedColor;
3025
addCommentTarget.style.opacity = commentOpacity;
3126
}
3227

lms/static/my.css

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ a {
140140
overflow: auto;
141141
padding: 0.75rem;
142142
text-align: center;
143-
border-right: #00000000 8px solid;
144-
border-left: #00000000 8px solid;
143+
border-inline: #00000000 8px solid;
145144
transition: box-shadow 0.3s ease, border-color 0.3s ease;
146145
}
147146

@@ -536,6 +535,8 @@ button.our-button-narrow, a.our-button-narrow {
536535
flex-direction: column;
537536
flex-basis: 70vw;
538537
flex-grow: 4;
538+
flex-shrink: 1;
539+
min-width: 0;
539540
}
540541

541542
.code-view-container {
@@ -959,12 +960,10 @@ code#user-code {
959960
flex-direction: row;
960961
justify-content: start;
961962
cursor: pointer;
963+
min-width: 0;
962964
width: 100%;
963-
/* Nice trick: with flex-grow: 1; and width: 0;
964-
* the line fits the container width
965-
* */
966-
width: 0;
967-
flex-grow: 1;
965+
flex-shrink: 1;
966+
border-inline-start: 1px solid #00000000;
968967
}
969968

970969
.grader-add {

lms/templates/exercises.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1 id="exercises-head">{{ _('Exercises') }}</h1>
2424
{% set details = {'page': 'view', 'icon': 'check-circle-o', 'text': _('Check'), 'css': 'checked', 'page_id': exercise['solution_id']} %}
2525
{% endif -%}
2626
<a href="{{ details['page'] }}/{{ details['page_id'] }}" class="exercise-link">
27-
<div class="exercise" {%- if exercise.grade_color %} style="border-right: 8px solid {{ exercise.grade_color }};" {%- endif -%}>
27+
<div class="exercise" {%- if exercise.grade_color %} style="border-inline-start-color: 8px solid {{ exercise.grade_color }};" {%- endif -%}>
2828
<div class="right-side {{ direction }}-language">
2929
<i class="fa fa-{{ details['icon'] }} exercise-status-icon" aria-hidden="true"></i>
3030
<div class="exercise-number me-3">{{ exercise['exercise_number'] }}</div>

0 commit comments

Comments
 (0)