Skip to content

Commit

Permalink
Increased font to match Medium-like size, fixed code missing padding …
Browse files Browse the repository at this point in the history
…on scroll

Former-commit-id: b50d7ef
  • Loading branch information
tomfran committed May 20, 2024
1 parent 2792b97 commit cf77fc7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
24 changes: 16 additions & 8 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ html {

body {
font-family: "Literata";
font-size: 1rem;
color: var(--content-primary);
line-height: 1.3rem;
margin: auto;
max-width: var(--main-width);
padding-left: var(--main-padding);
Expand All @@ -22,27 +20,29 @@ body {
h1 {
margin-top: var(--h1-margin-top);
margin-bottom: var(--h1-margin-bottom);
font-size: 2em;
font-size: var(--h1-font-size);
}

h2 {
margin-top: var(--h2-margin-top);
margin-bottom: var(--h2-margin-bottom);
font-size: 1.5em;
font-size: var(--h2-font-size);
}

h3,
h4,
h5,
h6 {
font-size: 1.2em;
font-size: var(--hx-font-size);
margin-top: var(--hx-margin-top);
margin-bottom: var(--hx-margin-bottom);
}

p {
margin-top: var(--p-margin-top);
margin-bottom: var(--p-margin-bottom);
font-size: var(--p-font-size);
line-height: var(--p-line-height);
}

ul {
Expand Down Expand Up @@ -71,12 +71,17 @@ pre {
overflow-x: auto;
-ms-overflow-style: none;
scrollbar-width: none;
line-height: 1.3em;
}

pre::-webkit-scrollbar {
display: none;
}

code span {
display: inline !important;
}

code {
-webkit-font-smoothing: antialiased;
-moz-font-feature-settings: "liga=1, dlig=1";
Expand All @@ -87,6 +92,7 @@ code {
font-variant-ligatures: contextual;
font-family: "Monaspace";
font-size: .9em;
line-height: 0;
}


Expand Down Expand Up @@ -172,8 +178,8 @@ footer a {
.line-date {
font-size: small;
font-family: "Monaspace";
min-width: 110px;
max-width: 110px;
min-width: 120px;
max-width: 120px;
text-align: right;
padding-right: 1rem;
margin-top: 0rem;
Expand Down Expand Up @@ -279,6 +285,8 @@ footer a {
/* Table of contents */

.toc {
font-size: var(--p-font-size);
line-height: calc(.9 * var(--p-line-height));
margin-top: var(--toc-margin-top);
margin-bottom: var(--toc-margin-bottom);
}
Expand Down Expand Up @@ -356,7 +364,7 @@ footer a {

.breadcrumbs {
/* font-family: "Monaspace"; */
font-size: small;
font-size: .8em;
margin-bottom: calc(-0.5 * var(--h1-margin-top));
}

Expand Down
10 changes: 8 additions & 2 deletions assets/css/vars.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:root {
--main-width: 750px;
--main-padding: 1rem;
--main-width: 780px;
--main-padding: 1.4em;
--main-padding-bottom: 3rem;

/* header settings */
Expand All @@ -21,6 +21,12 @@
--code-margin-top: 2rem;
--code-margin-bottom: 2rem;

--h1-font-size: 2em;
--h2-font-size: 1.8em;
--hx-font-size: 1.3em;
--p-font-size: 1em;
--p-line-height: 1.5em;

/* List indentation */
--li-indent: 1.5rem;
--ul-margin-top: 1rem;
Expand Down

0 comments on commit cf77fc7

Please sign in to comment.