From a9ed570aa813238f89dbc4fdc739c6a273258a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sat, 6 Apr 2024 18:06:21 +0100 Subject: [PATCH] Tufte tweaks to get around justified text, but will I just need to change how the widths are done more fundamentally? --- tufte/tufte-main.css | 55 +++++++++++++++++++++++++++---------- tufte/tufte-smallscreen.css | 22 +++++++++++---- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/tufte/tufte-main.css b/tufte/tufte-main.css index 69e8c8a..e0ba01e 100644 --- a/tufte/tufte-main.css +++ b/tufte/tufte-main.css @@ -15,7 +15,8 @@ } #workskin #chapters .userstuff > blockquote, -#workskin #chapters .userstuff .ng-binding > blockquote { +#workskin #chapters .userstuff .ng-binding > blockquote, +#workskin #chapters .userstuff > div[align=justify] > blockquote { font-family: "EB Garamond", Garamond, serif; } @@ -28,16 +29,23 @@ #workskin #chapters .userstuff .ng-binding > dl, #workskin #chapters .userstuff .ng-binding > ol, #workskin #chapters .userstuff .ng-binding > ul, -#workskin #chapters .userstuff .ng-binding > blockquote { +#workskin #chapters .userstuff .ng-binding > blockquote, +#workskin #chapters .userstuff > div[align=justify] > p, +#workskin #chapters .userstuff > div[align=justify] > dl, +#workskin #chapters .userstuff > div[align=justify] > ol, +#workskin #chapters .userstuff > div[align=justify] > ul, +#workskin #chapters .userstuff > div[align=justify] > blockquote { font-size: 1.4rem; line-height: 2rem; margin-left: 0; } #workskin #chapters .userstuff > p, -#workskin #chapters .userstuff .ng-binding > p, #workskin #chapters .userstuff > blockquote, -#workskin #chapters .userstuff .ng-binding > blockquote { +#workskin #chapters .userstuff .ng-binding > p, +#workskin #chapters .userstuff .ng-binding > blockquote, +#workskin #chapters .userstuff > div[align=justify] > p, +#workskin #chapters .userstuff > div[align=justify] > blockquote { margin-top: 1.4rem; margin-bottom: 1.4rem; padding-right: 0; @@ -46,17 +54,20 @@ } #workskin #chapters .userstuff > h1, -#workskin #chapters .userstuff .ng-binding > h1 { +#workskin #chapters .userstuff .ng-binding > h1, +#workskin #chapters .userstuff > div[align=justify] > h1 { font-weight: 400; margin-top: 4rem; margin-bottom: 1.5rem; font-size: 3.2rem; line-height: 1; font-family: inherit; + border-bottom: none; } #workskin #chapters .userstuff > h2, -#workskin #chapters .userstuff .ng-binding > h2 { +#workskin #chapters .userstuff .ng-binding > h2, +#workskin #chapters .userstuff > div[align=justify] > h2 { font-style: italic; font-weight: 400; margin-top: 2.1rem; @@ -64,10 +75,12 @@ font-size: 2.2rem; line-height: 1; font-family: inherit; + border-bottom: none; } #workskin #chapters .userstuff > h3, -#workskin #chapters .userstuff .ng-binding > h3 { +#workskin #chapters .userstuff .ng-binding > h3, +#workskin #chapters .userstuff > div[align=justify] > h3 { font-style: italic; font-weight: 400; font-size: 1.7rem; @@ -75,10 +88,12 @@ margin-bottom: 1.4rem; line-height: 1; font-family: inherit; + border-bottom: none; } #workskin #chapters .userstuff > hr, -#workskin #chapters .userstuff .ng-binding > hr { +#workskin #chapters .userstuff .ng-binding > hr, +#workskin #chapters .userstuff > div[align=justify] > hr { display: none; } @@ -87,13 +102,16 @@ #workskin #chapters .userstuff > ul, #workskin #chapters .userstuff .ng-binding > dl, #workskin #chapters .userstuff .ng-binding > ol, -#workskin #chapters .userstuff .ng-binding > ul { +#workskin #chapters .userstuff .ng-binding > ul, +#workskin #chapters .userstuff > div[align=justify] > dl, +#workskin #chapters .userstuff > div[align=justify] > ol, +#workskin #chapters .userstuff > div[align=justify] > ul { width: 50%; -webkit-padding-start: 5%; } -#workskin #chapters .userstuff a:link, -#workskin #chapters .userstuff a:visited { +#workskin a:link, +#workskin a:visited { border-bottom: none; color: inherit; text-decoration: none; @@ -107,13 +125,15 @@ } #workskin #chapters .userstuff > pre, -#workskin #chapters .userstuff .ng-binding > pre { +#workskin #chapters .userstuff .ng-binding > pre, +#workskin #chapters .userstuff > div[align=justify] > pre { margin-left: 0; } #workskin #chapters .userstuff code, #workskin #chapters .userstuff > pre > code, -#workskin #chapters .userstuff .ng-binding > pre > code { +#workskin #chapters .userstuff .ng-binding > pre > code, +#workskin #chapters .userstuff > div[align=justify] > pre { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 1.0rem; line-height: 1.42; @@ -159,14 +179,14 @@ } #workskin #chapters .chapter .preface .notes *, -#workskin #chapters .chapter .preface .summary *{ +#workskin #chapters .chapter .preface .summary * { font-size: 1.4rem; } #workskin #chapters .chapter .preface .notes h3, #workskin #chapters .chapter .preface .notes blockquote, #workskin #chapters .chapter .preface .summary h3, -#workskin #chapters .chapter .preface .summary blockquote{ +#workskin #chapters .chapter .preface .summary blockquote { font-family: "EB Garamond", Garamond, serif; border: none; } @@ -178,3 +198,8 @@ #workskin #chapters .chapter .preface + .module h3.landmark { display: none; } + +div[align=justify], +p[align=justify] { + text-align: left; +} diff --git a/tufte/tufte-smallscreen.css b/tufte/tufte-smallscreen.css index 0774c86..e2be753 100644 --- a/tufte/tufte-smallscreen.css +++ b/tufte/tufte-smallscreen.css @@ -13,15 +13,27 @@ #workskin #chapters .userstuff p, #workskin #chapters .userstuff footer, #workskin #chapters .userstuff table { - width: 100%; + width: 100% !important; } #workskin #chapters .userstuff pre > code { width: 97%; } -#workskin #chapters .userstuff dl, -#workskin #chapters .userstuff ol, -#workskin #chapters .userstuff ul { - width: 90%; +#workskin #chapters .userstuff > p, +#workskin #chapters .userstuff > blockquote, +#workskin #chapters .userstuff .ng-binding > p, +#workskin #chapters .userstuff .ng-binding > blockquote, +#workskin #chapters .userstuff > div[align=justify] > p, +#workskin #chapters .userstuff > div[align=justify] > blockquote, +#workskin #chapters .userstuff > dl, +#workskin #chapters .userstuff > ol, +#workskin #chapters .userstuff > ul, +#workskin #chapters .userstuff .ng-binding > dl, +#workskin #chapters .userstuff .ng-binding > ol, +#workskin #chapters .userstuff .ng-binding > ul, +#workskin #chapters .userstuff > div[align=justify] > dl, +#workskin #chapters .userstuff > div[align=justify] > ol, +#workskin #chapters .userstuff > div[align=justify] > ul { + width: 100%; }