mirror of
https://github.com/CompassConnections/Compass.git
synced 2025-12-23 22:18:43 -05:00
Failed attempt to increase api docs font size on mobile
This commit is contained in:
@@ -518,6 +518,12 @@ app.get(
|
||||
swaggerUi.setup(swaggerDocument, {
|
||||
customSiteTitle: 'Compass API Docs',
|
||||
customCssUrl: '/swagger.css',
|
||||
customJs: `
|
||||
const meta = document.createElement('meta');
|
||||
meta.name = 'viewport';
|
||||
meta.content = 'width=device-width, initial-scale=1';
|
||||
document.head.appendChild(meta);
|
||||
`,
|
||||
}),
|
||||
)
|
||||
app.use(rootPath, swaggerUi.serve)
|
||||
|
||||
@@ -65,13 +65,20 @@
|
||||
}
|
||||
|
||||
/* Increase font sizes on mobile for better readability */
|
||||
/* Still not working though */
|
||||
@media (max-width: 640px) {
|
||||
html,
|
||||
body,
|
||||
.swagger-ui {
|
||||
font-size: 16px !important;
|
||||
font-size: 32px !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
.swagger-ui {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
/* Common text elements */
|
||||
.swagger-ui p,
|
||||
.swagger-ui label,
|
||||
@@ -85,11 +92,9 @@
|
||||
.swagger-ui table tbody tr td,
|
||||
.swagger-ui .tab li,
|
||||
.swagger-ui .response-col_links,
|
||||
.swagger-ui .opblock-summary-path,
|
||||
.swagger-ui .opblock-summary-description {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.swagger-ui .opblock-summary-path {
|
||||
font-size: 20px !important;
|
||||
font-size: 32px !important;
|
||||
}
|
||||
|
||||
/* Headings scale */
|
||||
|
||||
Reference in New Issue
Block a user