Skip to content

Commit 900706b

Browse files
fix: improve styling of headers+lists in LMS+Studio (#34867)
1 parent 9ee5990 commit 900706b

3 files changed

Lines changed: 25 additions & 8 deletions

File tree

cms/static/sass/xmodule/_headings.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $headings-base-color: $gray-d2;
4141
%hd-3 {
4242
margin-bottom: ($baseline / 2);
4343
font-size: 1.35em;
44-
font-weight: $headings-font-weight-normal;
44+
font-weight: $headings-font-weight-bold;
4545
line-height: 1.4em;
4646
}
4747

@@ -105,15 +105,13 @@ $headings-base-color: $gray-d2;
105105
// ----------------------------
106106
// canned heading classes
107107
@for $i from 1 through $headings-count {
108+
h#{$i},
108109
.hd-#{$i} {
109110
@extend %hd-#{$i};
110111
}
111112
}
112113

113114
h3 {
114-
@extend %hd-2;
115-
116-
font-weight: $headings-font-weight-normal;
117115
// override external modules and xblocks that use inline CSS
118116
text-transform: initial;
119117
}

lms/static/sass/base/_headings.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $headings-base-color: $gray-d2;
4141
%hd-3 {
4242
margin-bottom: ($baseline / 2);
4343
font-size: 1.35em;
44-
font-weight: $headings-font-weight-normal;
44+
font-weight: $headings-font-weight-bold;
4545
line-height: 1.4em;
4646
}
4747

@@ -112,6 +112,12 @@ $headings-base-color: $gray-d2;
112112
// H3 was problematic in xblocks, we so we'll keep it as it was
113113

114114
.xblock .xblock {
115+
@for $i from 1 through $headings-count {
116+
h#{$i} {
117+
@extend %hd-#{$i};
118+
}
119+
}
120+
115121
h2 {
116122
@extend %hd-2;
117123

xmodule/static/css-builtin-blocks/ProblemBlockDisplay.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,13 +710,15 @@
710710
}
711711

712712
.xmodule_display.xmodule_ProblemBlock div.problem ul {
713+
padding-left: 1em;
713714
margin-bottom: lh();
714715
margin-left: .75em;
715716
margin-left: .75rem;
716717
list-style: disc outside none;
717718
}
718719

719720
.xmodule_display.xmodule_ProblemBlock div.problem ol {
721+
padding-left: 1em;
720722
margin-bottom: lh();
721723
margin-left: .75em;
722724
margin-left: .75rem;
@@ -753,6 +755,7 @@
753755
margin: lh() 0;
754756
border-collapse: collapse;
755757
table-layout: auto;
758+
max-width: 100%;
756759
}
757760

758761
.xmodule_display.xmodule_ProblemBlock div.problem table td.cont-justified-left,
@@ -801,7 +804,7 @@
801804

802805
.xmodule_display.xmodule_ProblemBlock div.problem code {
803806
margin: 0 2px;
804-
padding: 0px 5px;
807+
padding: 0 5px;
805808
border: 1px solid #eaeaea;
806809
border-radius: 3px;
807810
background-color: var(--gray-l6, #f8f8f8);
@@ -1195,11 +1198,11 @@
11951198
color: var(--uxpl-gray-dark, #111111);
11961199
}
11971200

1198-
.xmodule_display.xmodule_ProblemBlock div.problem .notification.problem-hint li {
1201+
.xmodule_display.xmodule_ProblemBlock div.problem .notification.problem-hint li[class*="hint-index-"] {
11991202
color: var(--uxpl-gray-base, #414141);
12001203
}
12011204

1202-
.xmodule_display.xmodule_ProblemBlock div.problem .notification.problem-hint li strong {
1205+
.xmodule_display.xmodule_ProblemBlock div.problem .notification.problem-hint li[class*="hint-index-"] > strong {
12031206
color: var(--uxpl-gray-dark, #111111);
12041207
}
12051208

@@ -1225,6 +1228,16 @@
12251228
margin-bottom: calc(var(--baseline, 20px) / 4);
12261229
}
12271230

1231+
.xmodule_display.xmodule_ProblemBlock div.problem .notification li[class*="hint-index-"] ul,
1232+
.xmodule_display.xmodule_ProblemBlock div.problem .notification li[class*="hint-index-"] ol {
1233+
padding: 0 0 0 1em;
1234+
margin-left: .75rem;
1235+
}
1236+
1237+
.xmodule_display.xmodule_ProblemBlock div.problem .notification li[class*="hint-index-"] ol {
1238+
list-style: decimal outside none;
1239+
}
1240+
12281241
.xmodule_display.xmodule_ProblemBlock div.problem .notification .notification-btn-wrapper {
12291242
float: right;
12301243
}

0 commit comments

Comments
 (0)