DEV: Add basic theme support to the mini_profiler badge (#14952)

This commit is contained in:
David Taylor 2021-11-15 18:39:11 +00:00 committed by GitHub
parent cbfe48b990
commit 389a3ce389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -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";

View File

@ -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);
}
}