Adding midsize formatting to tufte

This commit is contained in:
James Patrick 2024-02-03 14:44:26 -05:00 committed by James Patrick
parent 3d18575ee7
commit d912db5c21
1 changed files with 26 additions and 6 deletions

32
emacs/dist/tufte.css vendored
View File

@ -2,6 +2,10 @@
@import "custom.css"; @import "custom.css";
@import "code.css"; @import "code.css";
:root {
--prose-width: 55%;
}
/* Import ET Book styles /* Import ET Book styles
adapted from https://github.com/edwardtufte/et-book/blob/gh-pages/et-book.css */ adapted from https://github.com/edwardtufte/et-book/blob/gh-pages/et-book.css */
@font-face { @font-face {
@ -127,7 +131,7 @@ h3 {
hr { hr {
display: block; display: block;
height: 1px; height: 1px;
width: 55%; width: var(--prose-width);
border: 0; border: 0;
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
margin: 1em 0; margin: 1em 0;
@ -204,12 +208,12 @@ blockquote {
} }
blockquote p { blockquote p {
width: 55%; width: var(--prose-width);
margin-right: 40px; margin-right: 40px;
} }
blockquote footer { blockquote footer {
width: 55%; width: var(--prose-width);
font-size: 1.1rem; font-size: 1.1rem;
text-align: right; text-align: right;
} }
@ -217,7 +221,7 @@ blockquote footer {
article p, article p,
article footer, article footer,
article table { article table {
width: 55%; width: var(--prose-width);
} }
/* 50 + 5 == 55, to be the same width as paragraph */ /* 50 + 5 == 55, to be the same width as paragraph */
@ -239,7 +243,7 @@ figure {
font-size: 100%; font-size: 100%;
font: inherit; font: inherit;
vertical-align: baseline; vertical-align: baseline;
max-width: 55%; max-width: var(--prose-width);
-webkit-margin-start: 0; -webkit-margin-start: 0;
-webkit-margin-end: 0; -webkit-margin-end: 0;
margin: 0 0 3em 0; margin: 0 0 3em 0;
@ -477,6 +481,22 @@ label.margin-toggle:not(.sidenote-number) {
height: 100%; height: 100%;
} }
@media (max-width: 900px) {
:root {
--prose-width: 75%;
}
.sidenote,
.marginnote {
margin-right: calc(-100% + var(--prose-width) )
width: calc(100% - var(--prose-width) )
}
body {
padding-left: 8%;
padding-right: 8%;
}
}
@media (max-width: 760px) { @media (max-width: 760px) {
body { body {
width: 84%; width: 84%;
@ -552,6 +572,6 @@ label.margin-toggle:not(.sidenote-number) {
} }
img { img {
wxdth: 100%; width: 100%;
} }
} }