From 46e1d28881c069e7017d8b79816953710a0ba412 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Date: Fri, 15 Apr 2022 20:52:51 +0200 Subject: [PATCH] improve styling on mobile for swagger docs (#2516) Co-authored-by: Agusti Fernandez Pardo Co-authored-by: Peer Richelsen --- apps/swagger/styles/swagger-cal.css | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/apps/swagger/styles/swagger-cal.css b/apps/swagger/styles/swagger-cal.css index 2b96c9e312..a8563a18fd 100644 --- a/apps/swagger/styles/swagger-cal.css +++ b/apps/swagger/styles/swagger-cal.css @@ -4,7 +4,6 @@ background: black; color: white; border: none; - /* text-transform: uppercase; */ } .model .model-title { background: black; @@ -12,7 +11,6 @@ font-size: 1.5em; font-weight: bold; text-align: center; - /* margin-bottom: 20px; */ } .models-control { border-radius: 0; @@ -185,7 +183,15 @@ font-family: "Cal Sans", sans-serif; color: #fff; } - +@media only screen and (max-width: 600px) { +.swagger-ui .opblock .opblock-summary-method { + margin-right: -5px; +} +.swagger-ui .opblock .opblock-summary-path, +.swagger-ui .opblock .opblock-summary-path__deprecated { + margin-top: 20px; +} +} .swagger-ui .opblock .opblock-summary-path, .swagger-ui .opblock .opblock-summary-path__deprecated { font-size: 22px; @@ -233,7 +239,12 @@ color: #ffffff; text-transform: lowercase; } - +@media only screen and (max-width: 600px) { + .swagger-ui .opblock .opblock-summary-description { + margin: auto; + margin-top: 10px; +} +} .swagger-ui .opblock .opblock-summary { display: -webkit-box; display: -ms-flexbox; @@ -759,7 +770,11 @@ color: white; border: none; } - +@media only screen and (max-width: 600px) { +.swagger-ui button { + display: grid; +} +} .swagger-ui select { font-size: 14px; font-weight: 700;