From 1257e39d9265a28854c617fad526e2c79f5ba6f7 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Mon, 10 Aug 2020 16:57:19 +0800 Subject: [PATCH] MDL-69389 theme_classic: Make default body font colour darker Links and normal text should have at least a colour contrast ratio of 3:1. To achieve this, $body-color will be using the darker shade of gray $gray-900 (#212529). --- theme/classic/scss/preset/default.scss | 2 +- theme/classic/style/moodle.css | 42 +++++++++++++------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/theme/classic/scss/preset/default.scss b/theme/classic/scss/preset/default.scss index c5f2517f75f..8daf75262e6 100644 --- a/theme/classic/scss/preset/default.scss +++ b/theme/classic/scss/preset/default.scss @@ -37,7 +37,7 @@ $enable-rounded: true !default; $enable-responsive-font-sizes: true !default; // Body -$body-color: $gray-800 !default; +$body-color: $gray-900 !default; // Fonts $font-size-base: 0.9375rem !default; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index c346fb716ce..f11c02b6fa6 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -2382,7 +2382,7 @@ body { font-size: 0.9375rem; font-weight: 400; line-height: 1.5; - color: #343a40; + color: #212529; text-align: left; background-color: #fff; } @media (max-width: 1200px) { @@ -3515,7 +3515,7 @@ pre { .table { width: 100%; margin-bottom: 1rem; - color: #343a40; } + color: #212529; } .table th, .table td { padding: 0.75rem; @@ -3550,7 +3550,7 @@ pre { background-color: rgba(0, 0, 0, 0.05); } .table-hover tbody tr:hover { - color: #343a40; + color: #212529; background-color: rgba(0, 0, 0, 0.075); } .table-primary, @@ -3852,7 +3852,7 @@ select.form-control:focus::-ms-value { margin-bottom: 0; font-size: 0.9375rem; line-height: 1.5; - color: #343a40; + color: #212529; background-color: transparent; border: solid transparent; border-width: 1px 0; } @@ -4138,7 +4138,7 @@ textarea.form-control { .btn { display: inline-block; font-weight: 400; - color: #343a40; + color: #212529; text-align: center; vertical-align: middle; user-select: none; @@ -4156,7 +4156,7 @@ textarea.form-control { .btn { transition: none; } } .btn:hover { - color: #343a40; + color: #212529; text-decoration: none; } .btn:focus, .btn.focus { outline: 0; @@ -4636,7 +4636,7 @@ input[type="button"].btn-block { padding: 0.5rem 0; margin: 0.125rem 0 0; font-size: 0.9375rem; - color: #343a40; + color: #212529; text-align: left; list-style: none; background-color: #fff; @@ -6267,7 +6267,7 @@ input[type="button"].btn-block { text-decoration: none; background-color: #f8f9fa; } .list-group-item-action:active { - color: #343a40; + color: #212529; background-color: #e9ecef; } .list-group-item { @@ -6897,7 +6897,7 @@ a.close.disabled { .popover-body { padding: 0.5rem 0.75rem; - color: #343a40; } + color: #212529; } .carousel { position: relative; } @@ -9492,7 +9492,7 @@ a.text-dark:hover, a.text-dark:focus { color: #121416 !important; } .text-body { - color: #343a40 !important; } + color: #212529 !important; } .text-muted { color: #6c757d !important; } @@ -11713,7 +11713,7 @@ ul { #page-footer a .icon { color: #fff; } #page-footer a:focus .icon { - color: #343a40; } + color: #212529; } .bg-inverse a { color: #fff; @@ -11727,7 +11727,7 @@ ul { .dropdown-item a { display: block; width: 100%; - color: #343a40; } + color: #212529; } .dropdown-item:active a { color: #fff; } @@ -11876,7 +11876,7 @@ body.h5p-embed .h5pmessages { .matchtext { background-color: #b5d9f9; - color: #343a40; + color: #212529; height: 1.5rem; } .border-radius { @@ -12679,7 +12679,7 @@ body.h5p-embed .h5pmessages { .block .block-controls .dropdown-toggle { /* So that the caret takes the colour of the icon. */ - color: #343a40; } + color: #212529; } [data-region="blocks-column"] { width: 360px; @@ -15994,7 +15994,7 @@ body.jsenabled .questionflag input[type=checkbox] { margin: 0; } #page-mod-quiz-edit .questionbankwindow div.header .title { - color: #343a40; } + color: #212529; } #page-mod-quiz-edit div.container div.generalbox { background-color: transparent; @@ -16661,7 +16661,7 @@ fieldset.coursesearchbox label { padding: 0.2em; margin: 0; cursor: pointer; - color: #343a40; } + color: #212529; } .form-autocomplete-suggestions li:hover { background-color: #3f9def; @@ -16672,7 +16672,7 @@ fieldset.coursesearchbox label { color: #495057; } .form-autocomplete-downarrow { - color: #343a40; + color: #212529; top: 0.2rem; right: 0.5rem; cursor: pointer; } @@ -16892,10 +16892,10 @@ select { font-weight: inherit; } .path-mod-forum .subscriptionmode { - color: #343a40; } + color: #212529; } .path-mod-forum .activesetting { - color: #343a40; + color: #212529; font-weight: bold; } .discussion-settings-container .custom-select { @@ -18063,7 +18063,7 @@ div#dock { .generaltable { width: 100%; margin-bottom: 1rem; - color: #343a40; } + color: #212529; } .generaltable th, .generaltable td { padding: 0.75rem; @@ -18080,7 +18080,7 @@ div#dock { .generaltable.table-sm td { padding: 0.3rem; } .generaltable tbody tr:hover { - color: #343a40; + color: #212529; background-color: rgba(0, 0, 0, 0.075); } table caption { -- 2.43.0