From 0a726cf1c2f329016006e4e916c0ae53b1ce06cf Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 6 Sep 2023 18:46:53 +0400 Subject: [PATCH] Styling fixes for the OpenAPI browser (#152) --- src/css/custom.css | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 7558de16..f8b8ef7b 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -320,16 +320,22 @@ mark { text-decoration: line-through; } -html[data-theme="dark"] { - @media (prefers-color-scheme: dark) { - .swagger-ui { - filter: invert(88%) hue-rotate(180deg); - } - .swagger-ui .microlight { - filter: invert(100%) hue-rotate(180deg); - } - .markdown pre.base-url { - background: #fff !important; - } - } +html[data-theme="dark"] .swagger-ui { + filter: invert(88%) hue-rotate(180deg); +} + +html[data-theme="dark"] .swagger-ui .microlight { + filter: invert(100%) hue-rotate(180deg); +} + +html[data-theme="dark"] .markdown pre.base-url { + background: #fff !important; +} + +.markdown code { + background: none !important; +} + +html[data-theme="dark"] .swagger-ui .opblock-body pre.microlight { + background: black !important; }