Skip to content

Commit

Permalink
Guarantee font size across several formats and fix CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 28, 2025
1 parent ac5c32e commit 453fc90
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 24 deletions.
7 changes: 7 additions & 0 deletions assets/css/content/code.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* The Consolas font on Windows is too small compared to other ones */
@font-face {
font-family: "Consolas";
src: local("Consolas");
size-adjust: 110%;
}

.content-inner.content-inner :is(a:has(code, img), pre a) {
color: var(--link-color);
text-shadow: none;
Expand Down
4 changes: 2 additions & 2 deletions assets/css/content/functions.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

.content-inner .detail-header .signature {
font-family: var(--monoFontFamily);
font-size: var(--text-sm);
font-size: 13px;
font-weight: 700;
line-height: 2em;
}
Expand Down Expand Up @@ -60,7 +60,7 @@

.content-inner .specs pre {
font-family: var(--monoFontFamily);
font-size: 13px;
font-size: var(--text-xs);
font-style: normal;
line-height: 24px;
white-space: pre-wrap;
Expand Down
5 changes: 1 addition & 4 deletions assets/css/content/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
flex-wrap: nowrap;
gap: 32px;
align-items: flex-start;
.icon-action {
padding-top: 1.7rem; /* vertically align with x-height of first line of heading */
}
}
}

Expand Down Expand Up @@ -120,7 +117,7 @@

.content-inner .note {
color: var(--iconAction);
font-size: var(--text-sm);
font-size: var(--text-xs);
font-weight: normal;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/css/content/summary.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

.content-inner .summary .summary-row .summary-signature {
font-family: var(--monoFontFamily);
font-size: var(--text-sm);
font-size: 13px;
font-weight: 700;
}

Expand Down
6 changes: 3 additions & 3 deletions assets/css/custom-props/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
--navTabBorderWidth: 2px;

/* Font Families */
/* modern-normalize.css handles the default font */
--sansFontFamily: "Lato", ui-sans-serif, system-ui, sans-serif;
--monoFontFamily: ui-monospace, monospace;
/* These mirror modern-normalize.css with "Lato" on top */
--sansFontFamily: "Lato", system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
--monoFontFamily: ui-monospace, SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;

/* Typography */
--baseLineHeight: 1.5em;
Expand Down
1 change: 1 addition & 0 deletions formatters/epub/dist/epub-elixir-YTAUI3IP.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 453fc90

Please sign in to comment.