From 389a3ce3892f3cee674c39bfb4e04cf5d157a34e Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 15 Nov 2021 18:39:11 +0000 Subject: [PATCH] DEV: Add basic theme support to the mini_profiler badge (#14952) --- .../stylesheets/common/admin/admin_base.scss | 1 + .../common/admin/mini_profiler.scss | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 app/assets/stylesheets/common/admin/mini_profiler.scss diff --git a/app/assets/stylesheets/common/admin/admin_base.scss b/app/assets/stylesheets/common/admin/admin_base.scss index 922b62587b0..a50348b3a20 100644 --- a/app/assets/stylesheets/common/admin/admin_base.scss +++ b/app/assets/stylesheets/common/admin/admin_base.scss @@ -985,3 +985,4 @@ a.inline-editable-field { @import "common/admin/admin_report_inline_table"; @import "common/admin/admin_intro"; @import "common/admin/admin_emojis"; +@import "common/admin/mini_profiler"; diff --git a/app/assets/stylesheets/common/admin/mini_profiler.scss b/app/assets/stylesheets/common/admin/mini_profiler.scss new file mode 100644 index 00000000000..07115037aa2 --- /dev/null +++ b/app/assets/stylesheets/common/admin/mini_profiler.scss @@ -0,0 +1,22 @@ +// Some basic overrides to https://github.com/MiniProfiler/rack-mini-profiler/blob/master/lib/html/includes.scss +// which make the badge conform to the current site theme. + +div.profiler-results { + .profiler-button { + background-color: var(--header_background); + color: var(--header_primary); + border-bottom: 1px solid var(--header_primary-low); + + .profiler-number { + color: var(--header_primary); + } + + .profiler-unit { + color: var(--header_primary-medium); + } + } + + &.profiler-left.profiler-top .profiler-button { + border-right: 1px solid var(--header_primary-low); + } +}