Skip to content

Commit 14f9da5

Browse files
committed
Improve accessibility font sizes.
1 parent e851056 commit 14f9da5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ This package follows standard semver, `<major>.<minor>.<build>`. No breaking cha
33

44
## 2.3
55
* Schema types will now utilize the title property for displaying, rather than the type ID, when defined.
6+
* Increase font sizes by 1px to set a more accessible default display.
67

78
## 2.2
89
* The `table` view is now the default as the `tree` view becomes deprecated. To display the `tree` view, use the `tree` attribute on the openapi-explorer html element.

src/styles/font-styles.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default css`
7777
syntax-highlighter {
7878
margin: 0px;
7979
font-family: var(--font-mono);
80-
font-size: calc(var(--font-size-mono) - 1px);
80+
font-size: var(--font-size-mono);
8181
}
8282
8383
.m-markdown syntax-highlighter {
@@ -142,7 +142,7 @@ export default css`
142142
}
143143
144144
.m-markdown-small code, .m-markdown-small syntax-highlighter {
145-
font-size: calc(var(--font-size-mono) - 1px);
145+
font-size: var(--font-size-mono);
146146
}
147147
148148
.m-markdown-small pre,
@@ -256,11 +256,11 @@ export default css`
256256
}
257257
258258
.m-markdown-small table code {
259-
font-size: calc(var(--font-size-mono) - 2px);
259+
font-size: calc(var(--font-size-mono) - 1px);
260260
}
261261
262262
.m-markdown table code {
263-
font-size: calc(var(--font-size-mono) - 1px);
263+
font-size: var(--font-size-mono);
264264
}
265265
266266
.m-markdown blockquote,

src/utils/theme.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ export default function setTheme(theme = {}) {
105105
--layout: ${this.layout || 'column'};
106106
--nav-path-padding: 7px 0 7px 1.5rem;
107107
--resp-area-height: ${this.responseAreaHeight};
108-
--font-size-small: 13px;
109-
--font-size-mono: 13px;
110-
--font-size-regular: 16px;
108+
--font-size-small: 16px;
109+
--font-size-mono: 15px;
110+
--font-size-regular: 18px;
111111
--dialog-z-index: 1000;
112112
113113
/* Theme specific styles */

0 commit comments

Comments
 (0)