From 6d522be2cfa8cdfa23b57cad07fc918c2732e83c Mon Sep 17 00:00:00 2001 From: Tasio Date: Thu, 17 Apr 2025 13:00:18 +0200 Subject: [PATCH] MDL-85222 themes: Remove grey zebra-striping background on reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only removing the grey background in small sceens when the table is displayed as an accordion Co-authored-by: Mikel Martín Corrales --- theme/boost/scss/moodle/reportbuilder.scss | 6 ++---- theme/boost/style/moodle.css | 16 ++++++++-------- theme/classic/style/moodle.css | 16 ++++++++-------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/theme/boost/scss/moodle/reportbuilder.scss b/theme/boost/scss/moodle/reportbuilder.scss index 093ceef7090..9b68b3d04c2 100644 --- a/theme/boost/scss/moodle/reportbuilder.scss +++ b/theme/boost/scss/moodle/reportbuilder.scss @@ -373,6 +373,8 @@ $rb-sortable-list-drag-color: lighten($primary, 40%); @mixin table-cards { table.reportbuilder-table { + --#{$prefix}table-striped-bg: #{$card-bg}; + --#{$prefix}table-hover-bg: #{$card-bg}; thead { display: none; } @@ -381,14 +383,10 @@ $rb-sortable-list-drag-color: lighten($primary, 40%); flex-direction: column; margin: .5rem 0; padding: .25rem .5rem 0 .5rem; - background-color: $card-bg !important; /* stylelint-disable-line declaration-no-important */ word-wrap: break-word; background-clip: border-box; border: $card-border-width solid $card-border-color; @include border-radius($card-border-radius); - &:hover { - background-color: $card-bg !important; /* stylelint-disable-line declaration-no-important */ - } &.emptyrow { display: none; } diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 2cc5918bee7..38e2972279f 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -40172,6 +40172,10 @@ div.editor_atto_toolbar button .icon { } @media (max-width: 575.98px) { + .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table { + --bs-table-striped-bg: var(--bs-body-bg); + --bs-table-hover-bg: var(--bs-body-bg); + } .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table thead { display: none; } @@ -40180,15 +40184,11 @@ div.editor_atto_toolbar button .icon { flex-direction: column; margin: 0.5rem 0; padding: 0.25rem 0.5rem 0 0.5rem; - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ word-wrap: break-word; background-clip: border-box; border: var(--bs-border-width) solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius); } - .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table tr:hover { - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ - } .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table tr.emptyrow { display: none; } @@ -40232,6 +40232,10 @@ div.editor_atto_toolbar button .icon { } } @media (min-width: 576px) { + .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table { + --bs-table-striped-bg: var(--bs-body-bg); + --bs-table-hover-bg: var(--bs-body-bg); + } .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table thead { display: none; } @@ -40240,15 +40244,11 @@ div.editor_atto_toolbar button .icon { flex-direction: column; margin: 0.5rem 0; padding: 0.25rem 0.5rem 0 0.5rem; - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ word-wrap: break-word; background-clip: border-box; border: var(--bs-border-width) solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius); } - .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table tr:hover { - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ - } .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table tr.emptyrow { display: none; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 7b6a7e981f8..dad1b7efebe 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -40106,6 +40106,10 @@ div.editor_atto_toolbar button .icon { } @media (max-width: 575.98px) { + .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table { + --bs-table-striped-bg: var(--bs-body-bg); + --bs-table-hover-bg: var(--bs-body-bg); + } .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table thead { display: none; } @@ -40114,15 +40118,11 @@ div.editor_atto_toolbar button .icon { flex-direction: column; margin: 0.5rem 0; padding: 0.25rem 0.5rem 0 0.5rem; - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ word-wrap: break-word; background-clip: border-box; border: var(--bs-border-width) solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius); } - .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table tr:hover { - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ - } .reportbuilder-report[data-report-type="0"]:not([data-editing]):not([data-force-table]) table.reportbuilder-table tr.emptyrow { display: none; } @@ -40166,6 +40166,10 @@ div.editor_atto_toolbar button .icon { } } @media (min-width: 576px) { + .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table { + --bs-table-striped-bg: var(--bs-body-bg); + --bs-table-hover-bg: var(--bs-body-bg); + } .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table thead { display: none; } @@ -40174,15 +40178,11 @@ div.editor_atto_toolbar button .icon { flex-direction: column; margin: 0.5rem 0; padding: 0.25rem 0.5rem 0 0.5rem; - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ word-wrap: break-word; background-clip: border-box; border: var(--bs-border-width) solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius); } - .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table tr:hover { - background-color: var(--bs-body-bg) !important; /* stylelint-disable-line declaration-no-important */ - } .reportbuilder-report[data-report-type="0"]:not([data-editing])[data-force-card] table.reportbuilder-table tr.emptyrow { display: none; }