Skip to content

Commit 6b15fcf

Browse files
MDL-86547 theme_boost: Improve code block readability in editor
Changed code text color to $gray-900 for better visibility
1 parent 543bf96 commit 6b15fcf

5 files changed

Lines changed: 47 additions & 4 deletions

File tree

public/theme/boost/scss/editor.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Code
2+
$gray-900: #1d2125 !default;
3+
$code-color: $gray-900 !default;
4+
15
/* Give editor access to all of bootstrap. */
26
@import "bootstrap/bootstrap";
37

@@ -17,3 +21,10 @@ table:not(.table) {
1721
border-width: $table-border-width;
1822
}
1923
}
24+
25+
// Override default code styling to enhance visual distinction.
26+
code {
27+
padding: 0.1875rem 0.375rem;
28+
background-color: var(--bs-gray-200);
29+
border-radius: 0.25rem;
30+
}

public/theme/boost/scss/preset/default.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ $behatsite: false !default;
105105
$enable-transitions: not $behatsite !default;
106106
$enable-smooth-scroll: not $behatsite !default;
107107

108+
// Code
109+
$code-color: $gray-900 !default;
110+
108111
// Import FontAwesome.
109112
@import "fontawesome";
110113

@@ -151,3 +154,10 @@ $warning-outline: #a6670e;
151154
.btn-outline-warning {
152155
@include button-outline-variant($warning-outline);
153156
}
157+
158+
// Override default code styling to enhance visual distinction.
159+
code {
160+
padding: 0.1875rem 0.375rem;
161+
background-color: var(--bs-gray-200);
162+
border-radius: 0.25rem;
163+
}

public/theme/boost/style/moodle.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13385,7 +13385,7 @@ readers do not read off random characters that represent icons */
1338513385
--bs-link-hover-color: #0c5699;
1338613386
--bs-link-hover-color-rgb: 12, 86, 153;
1338713387
--bs-link-hover-decoration: underline;
13388-
--bs-code-color: #db1a74;
13388+
--bs-code-color: #1d2125;
1338913389
--bs-highlight-color: #1d2125;
1339013390
--bs-highlight-bg: #ffe3d1;
1339113391
--bs-border-width: 1px;
@@ -13457,7 +13457,7 @@ readers do not read off random characters that represent icons */
1345713457
--bs-link-hover-color: #8cb9e1;
1345813458
--bs-link-color-rgb: 111, 167, 217;
1345913459
--bs-link-hover-color-rgb: 140, 185, 225;
13460-
--bs-code-color: #e976ac;
13460+
--bs-code-color: #777a7c;
1346113461
--bs-highlight-color: #dee2e6;
1346213462
--bs-highlight-bg: #662f0a;
1346313463
--bs-border-color: #495057;
@@ -47722,4 +47722,10 @@ body {
4772247722
--bs-btn-disabled-bg: transparent;
4772347723
--bs-btn-disabled-border-color: #a6670e;
4772447724
--bs-gradient: none;
47725+
}
47726+
47727+
code {
47728+
padding: 0.1875rem 0.375rem;
47729+
background-color: var(--bs-gray-200);
47730+
border-radius: 0.25rem;
4772547731
}

public/theme/classic/scss/preset/default.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ $behatsite: false !default;
104104
$enable-transitions: not $behatsite !default;
105105
$enable-smooth-scroll: not $behatsite !default;
106106

107+
// Code
108+
$code-color: $gray-900 !default;
109+
107110
// Import FontAwesome.
108111
@import "fontawesome";
109112

@@ -157,3 +160,10 @@ $warning-outline: #a6670e;
157160
.btn-outline-warning {
158161
@include button-outline-variant($warning-outline);
159162
}
163+
164+
// Override default code styling to enhance visual distinction.
165+
code {
166+
padding: 0.1875rem 0.375rem;
167+
background-color: var(--bs-gray-200);
168+
border-radius: 0.25rem;
169+
}

public/theme/classic/style/moodle.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13385,7 +13385,7 @@ readers do not read off random characters that represent icons */
1338513385
--bs-link-hover-color: #0c5699;
1338613386
--bs-link-hover-color-rgb: 12, 86, 153;
1338713387
--bs-link-hover-decoration: underline;
13388-
--bs-code-color: #db1a74;
13388+
--bs-code-color: #1d2125;
1338913389
--bs-highlight-color: #1d2125;
1339013390
--bs-highlight-bg: #ffe3d1;
1339113391
--bs-border-width: 1px;
@@ -13457,7 +13457,7 @@ readers do not read off random characters that represent icons */
1345713457
--bs-link-hover-color: #8cb9e1;
1345813458
--bs-link-color-rgb: 111, 167, 217;
1345913459
--bs-link-hover-color-rgb: 140, 185, 225;
13460-
--bs-code-color: #e976ac;
13460+
--bs-code-color: #777a7c;
1346113461
--bs-highlight-color: #dee2e6;
1346213462
--bs-highlight-bg: #662f0a;
1346313463
--bs-border-color: #495057;
@@ -47666,6 +47666,12 @@ body {
4766647666
--bs-gradient: none;
4766747667
}
4766847668

47669+
code {
47670+
padding: 0.1875rem 0.375rem;
47671+
background-color: var(--bs-gray-200);
47672+
border-radius: 0.25rem;
47673+
}
47674+
4766947675
.path-grade-report-grader .gradeparent tr.heading {
4767047676
top: 50px;
4767147677
}

0 commit comments

Comments
 (0)