File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -518,6 +518,12 @@ app.get(
518518 swaggerUi . setup ( swaggerDocument , {
519519 customSiteTitle : 'Compass API Docs' ,
520520 customCssUrl : '/swagger.css' ,
521+ customJs : `
522+ const meta = document.createElement('meta');
523+ meta.name = 'viewport';
524+ meta.content = 'width=device-width, initial-scale=1';
525+ document.head.appendChild(meta);
526+ ` ,
521527 } ) ,
522528)
523529app . use ( rootPath , swaggerUi . serve )
Original file line number Diff line number Diff line change 6565}
6666
6767/* Increase font sizes on mobile for better readability */
68+ /* Still not working though */
6869@media (max-width : 640px ) {
70+ html ,
6971 body ,
7072 .swagger-ui {
71- font-size : 16 px !important ;
73+ font-size : 32 px !important ;
7274 line-height : 1.5 !important ;
7375 }
7476
77+ .swagger-ui {
78+ -webkit-text-size-adjust : 100% ;
79+ text-size-adjust : 100% ;
80+ }
81+
7582 /* Common text elements */
7683 .swagger-ui p ,
7784 .swagger-ui label ,
8592 .swagger-ui table tbody tr td ,
8693 .swagger-ui .tab li ,
8794 .swagger-ui .response-col_links ,
95+ .swagger-ui .opblock-summary-path ,
8896 .swagger-ui .opblock-summary-description {
89- font-size : 16px !important ;
90- }
91- .swagger-ui .opblock-summary-path {
92- font-size : 20px !important ;
97+ font-size : 32px !important ;
9398 }
9499
95100 /* Headings scale */
You can’t perform that action at this time.
0 commit comments