From 6e040f3a0e71fb2629f2512af10b06c3ee072596 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Sat, 6 May 2023 16:41:46 -1000 Subject: [PATCH] checkpoint --- grammar/gazetteTheme.grammar | 28 ------------------------ grammar/theme.grammar | 32 +++++++++++++++++++++++++++ grammar/tufteTheme.grammar | 42 ------------------------------------ 3 files changed, 32 insertions(+), 70 deletions(-) diff --git a/grammar/gazetteTheme.grammar b/grammar/gazetteTheme.grammar index 280a509fd..121fd1d48 100644 --- a/grammar/gazetteTheme.grammar +++ b/grammar/gazetteTheme.grammar @@ -112,35 +112,7 @@ gazetteCssParser cursor default .scrollCodeBlock - overflow auto - font-size 80% - hyphens none - white-space pre border-left .5em solid rgba(204,204,204,.8) - break-inside avoid - display block - margin .5em 0 - padding .5em - border-radius 0 - position relative - .scrollCodeBlock:hover - .scrollCopyButton - opacity .5 - .scrollCopyButton:hover - opacity .8 - .scrollCopyButton:active - opacity 1 - .scrollCopyButton - position absolute - top 2px - right 2px - font-size 14px - cursor pointer - opacity 0 - .scrollCopyButton::after - content "[ ]" - .scrollCopiedButton::after - content "[✓]" .scrollTable table-layout fixed diff --git a/grammar/theme.grammar b/grammar/theme.grammar index 276f53772..bdd6f4256 100644 --- a/grammar/theme.grammar +++ b/grammar/theme.grammar @@ -9,6 +9,9 @@ abstractThemeCssParser cruxFromId catchAllCellType stringCell string scrollStyles + figure + margin 0 + padding 0 .scrollCaptionedFigure display block text-align center @@ -17,6 +20,35 @@ abstractThemeCssParser height auto figcaption font-style italic + .scrollCodeBlock + overflow auto + font-size 80% + hyphens none + white-space pre + break-inside avoid + display block + margin .5em 0 + padding .5em + border-radius 0 + position relative + .scrollCodeBlock:hover + .scrollCopyButton + opacity .5 + .scrollCopyButton:hover + opacity .8 + .scrollCopyButton:active + opacity 1 + .scrollCopyButton + position absolute + top 2px + right 2px + font-size 14px + cursor pointer + opacity 0 + .scrollCopyButton::after + content "[ ]" + .scrollCopiedButton::after + content "[✓]" javascript get useTags() { return !(this.get("tags") === "false") diff --git a/grammar/tufteTheme.grammar b/grammar/tufteTheme.grammar index 92ce2d5ee..2a78a9bc1 100644 --- a/grammar/tufteTheme.grammar +++ b/grammar/tufteTheme.grammar @@ -130,46 +130,11 @@ tufteCssParser } dt:not(:first-child), li:not(:first-child) { margin-top: 0.25rem; - } - figure { - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; - max-width: 55%; - -webkit-margin-start: 0; - -webkit-margin-end: 0; - margin: 0 0 3em 0; - } - figcaption { - float: right; - clear: right; - margin-top: 0; - margin-bottom: 0; - font-size: 1.1rem; - line-height: 1.6; - vertical-align: baseline; - position: relative; - max-width: 40%; - } - figure.fullwidth figcaption { - margin-right: 24%; } /* Links: replicate underline that clears descenders */ a:link, a:visited { color: inherit; } - /* Adds dark mode */ - @media (prefers-color-scheme: dark) { - a:link, .tufte-underline, .hover-tufte-underline:hover { - text-shadow: 0.03em 0 #151515, -0.03em 0 #151515, 0 0.03em #151515, 0 -0.03em #151515, 0.06em 0 #151515, -0.06em 0 #151515, 0.09em 0 #151515, -0.09em 0 #151515, 0.12em 0 #151515, -0.12em 0 #151515, 0.15em 0 #151515, -0.15em 0 #151515; - } - } - a:link::selection, a:link::-moz-selection { - text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe; - background: #b4d5fe; - } /* Sidenotes, margin notes, figures, captions */ img { max-width: 100%; @@ -294,13 +259,6 @@ tufteCssParser } section > dl, section > ol, section > ul { width: 90%; - } - figure { - max-width: 90%; - } - figcaption, figure.fullwidth figcaption { - margin-right: 0%; - max-width: none; } blockquote { margin-left: 1.5em;