diff --git a/src/css/modern.css b/src/css/modern.css index 99fad0a..a0872dc 100644 --- a/src/css/modern.css +++ b/src/css/modern.css @@ -1,68 +1,145 @@ -/* CSS to be used for HTML Org-mode export - Author: Yann Esposito -*/ - /* Fonts */ -body { - font-family: "Helvetica Neue", sans-serif; - font-weight: 300; - font-size: 16px/1.6; +html,body { + font: 18px/1.8 "Helvetica Neue", sans-serif; line-height: 1.5em; + font-weight: 300; + margin:0; + padding:0; + text-rendering: optimizeLegibility; } +h1,h2 { font-family: "Hoefler Text"; + font-style: italic; + text-rendering: optimizeLegibility; + } pre, pre code { line-height: 1em; + font-size: .8em; } -/* Layout */ -body, h1, h2, h3, h4, h5, h6, pre, code, blockquote, ol, ul, ol ol, ul ul, ul ol, ol -ul, li, p, section, header, footer, img { - float: none; - margin: 0; - padding: 0; - border: 0; - hyphens: auto; +img { width: 100%; } +label:hover { cursor:pointer; } +#content,.content { + max-width: 48em; + padding: 0 1em; + margin: 0 auto; } -h1, h2, h3, h4, h5, h6, pre, code, blockquote, p, ul, ol, section, header, -figure,table { - margin-top: 1em; - margin-bottom: 1em; +pre { + border: dashed 1px; + padding: 1ex; + max-width: 100%; + overflow-x: scroll; + overflow-y: hidden; } -li { - display: block; - padding-left: 2ch; +body > input { + display:none; } -ol > li:before, ul > li:before { - content: "– "; - opacity: 0.5; - float: left; - position: relative; - left: -2ch; - text-align: right; - width: 0; +.main { + min-height:calc(100vh - 2.5em); } -ol { - counter-reset: ol; +#content { margin-top: 2em; } +#table-of-contents { + border-bottom: dashed; + padding-bottom: 2em; + margin-bottom: 2em; } -ol > li:before { - content: counter(ol) ". "; - counter-increment: ol; +:root { + --b03: #202631; + --b02: #2B313C; + --b01: #656B74; + --b00: #727781; + --b0: #8B919B; + --b1: #989EA8; + --b2: #E5E8ED; + --b3: #F4F7FC; + --y: #A98D50; + --o: #aa6550; + --r: #b85a64; + --m: #af53b0; + --v: #846f93; + --b: #5679a4; + --c: #4c8493; + --g: #728b5c; + + --fg: var(--b00); + --bg: var(--b3); + --fg2: var(--b1); + --bg2: var(--b2); + --rfg: var(--b01); + --rbg: var(--b2); + --bdr: var(--b2); + --l-fg: var(--bg); + --l-bg: var(--g); } -ol > li:nth-child(n+10) { - padding-left:3ch; +/* --------------------------------------------------------------------------- */ +/* Default color theme */ +/* colors theme */ +/* Dark themes soften and darken images */ +@media (prefers-color-scheme: dark) { + :root { + --fg: var(--b0); + --bg: var(--b03); + --fg2: var(--b01); + --bg2: var(--b02); + --rfg: var(--b1); + --rbg: var(--b02); + --bdr: var(--b02); + --l-fg: var(--bg); + --l-bg: var(--g); + } } -ol > li:nth-child(n+10):before { - left: -3ch; + +/* Manually checked colortheme */ +#d:checked ~ * { + --fg: var(--b0); + --bg: var(--b03); + --fg2: var(--b01); + --bg2: var(--b02); + --rfg: var(--b1); + --rbg: var(--b02); + --bdr: var(--b02); + --l-fg: var(--bg); + --l-bg: var(--g); } -img { - width: 100%; - max-height: 100vh; - margin: 1em auto; + +/* --------------------------------------------------------------------------- */ +/* Light theme selected */ +#l:checked ~ * { + --fg: var(--b00); + --bg: var(--b3); + --fg2: var(--b1); + --bg2: var(--b2); + --rfg: var(--b01); + --rbg: var(--b2); + --bdr: var(--b2); + --l-fg: var(--bg); + --l-bg: var(--g); } -p > img, li > img { - max-height: 1cap; - width: auto; - margin: 0; - vertical-align: middle; + +/* ----------------- */ +#labels,#preamble,#postamble { + padding: 2em 0; + background: var(--y); + color: var(--bg); } +#labels a,#preamble a,#postamble a { + color: var(--bg2); +} +.main { background: var(--bg); + color: var(--fg);} +/* -------- */ +/* org colors */ +.todo, .done, .main .todo, .main .done { + background: var(--rbg); + border: solid 1px; + height: 10px; + display: inline-block; + line-height: 12px; + font-weight: bold; + font-size: 10px; +} +b,i,strong,em { + color: var(--rfg); +} + table { display: block; /* for overflow to work */ max-width: 100%; @@ -88,354 +165,13 @@ sup > a { padding: 1px 2px; font-weight: bold; } - -/* Markdown tricks */ -h1,h2,h3,h4,h5,h6 { - font-size: 1em; -} -#preamble h1 { - margin-top: 0; -} -#table-of-contents, -#table-of-contents ul, -#table-of-contents h2 -{ - padding:0; - margin:0; -} -#table-of-contents { - margin-bottom: 1em; -} -pre { - max-width: 100%; - overflow-x: scroll; - overflow-y: hidden; -} -pre code { - background: none; -} -blockquote,#table-of-contents { - margin-left: 0; - position: relative; - padding-left: 17px; - padding-left: 2ch; - overflow: hidden; -} -nav { - font-weight: bold; - display: block; - padding: 10px 0; -} -nav > a { - margin-right: 10px; -} - -/* org mode ids and classes */ -figure, .figure { - margin: 1em 0; -} -#content,.content { - max-width: 46em; - margin: 0 auto; - padding: 0 1em; -} -#content:last-child, .notes *:last-child, blockquote *:last-child { - margin-bottom: 0; -} -#content:first-child, .notes *:first-child, blockquote *:first-child{ - margin-top: 0; -} -#postamble { - margin-top: 1em; -} -.timestamp-wrapper { - font-size: 12px; -} -.todo, .done { - font-size: 12px; - font-weight: bold; - padding: 1px 1ex; -} -.article-date { - font-size: 0.8em; - font-style: italic; - float: right; -} -.footpara { - display: inline; -} -.footdef > sup { - vertical-align: middle; -} -.footdef > sup::after { - content: ": "; -} -.notes { - padding: 5px 10px; -} -.notes::before { - content: "☞"; - float: left; - display: inline-block; - width: 1.5em; -} -.underline { - text-decoration: underline; -} -/* colors theme */ -:root { - color-scheme: light dark; /* support color scheme */ - --base03: #202631; - --base02: #2B313C; - --base01: #656B74; - --base00: #727781; - --base0: #8B919B; - --base1: #989EA8; - --base2: #E5E8ED; - --base3: #F4F7FC; - --yellow: #A98D50; - --orange: #aa6550; - --red: #b85a64; - --magenta: #af53b0; - --violet: #846f93; - --blue: #5679a4; - --cyan: #4c8493; - --green: #728b5c; - - --bg: #fff; - --fg: #444; - --bg2: #eee; - --fg2: #333; - --rfg: #000; - --rbg: #eee; - --bdr: #ddd; - --l-fg: var(--bg); - --l-bg: var(--magenta); -} - -/* org colors */ -@media (prefers-color-scheme: light) { - :root { - --bg: #fff; - --fg: #444; - --bg2: #eee; - --fg2: #333; - --rfg: #000; - --rbg: #eee; - --bdr: #ddd; - --l-fg: var(--bg); - --l-bg: var(--magenta); - } -} -/* Dark themes soften and darken images */ -@media (prefers-color-scheme: dark) { - img { - filter: brightness(0.8); - } -} -#h { - float: left; -} -#labels { - width: 100%; - text-align: right; -} -#labels label { - text-decoration: underline; - cursor: pointer; - font-style: italic; -} - -/* --------------------------------------------------------------------------- */ -/* Light modern theme selected */ - -#labels a { - color: #fff; -} -.content, #content { - margin: 0 auto; -} -blockquote { - font-family: "Hoefler Text", Georgia, serif; - font-style: italic; - font-size: 20px; - line-height: 30px; - border-left: solid 10px; -} -h1, h2 { - font-family: "Hoefler Text", Georgia, serif; - font-style: italic; - font-size: 2em; - line-height: 1.5em; - margin: 1em 0; - color: var(--rfg); -} - -h3, h4, h5, h6 { - font-weight: 200; - font-size: 1.5em; - line-height: 1.5em; - margin: 1em 0; - color: var(--rfg); -} -h4{ - font-size: 1.25em; - line-height: 1.25em; -} -h5, h6 { - font-size: 1em; - line-height: 1em; -} -#preamble { - border-bottom: solid 1px rgba(0,0,0,0.2); -} -#postamble { - border-top: solid 1px rgba(0,0,0,0.2); -} -#preamble h1 { - font-size: 4em; - line-height: 1.5em; - margin: .5em 0; -} -pre { - font-size: 14px; - line-height: 1em; - border-left: solid 4px var(--fg2); - padding-left: 1em; -} -pre::before, -pre::after { - content: ""; -} -#preamble, #postamble { - background: var(--cyan); - padding: 1em 0; -} -#preamble { - margin-bottom: 2em; -} -#postamble { -rgin-top: 2em; -} -#postamble code { -ckground: transparent; -} -#preamble *, -#postamble * { - color: #fff; -} -#labels { - background: var(--cyan); - color: #fff; -} -#labels .content { - margin: 0 auto; -} - -/* --------------------------------------------------------------------------- */ -/* Default color theme */ -body,.main { - background: var(--bg); - color: var(--fg); -} -.main { - padding-top:1em; -} -::selection, .main ::selection, -::-moz-selection, .main ::-moz-selection { - color: white; - background: var(--blue); -} -a, a:visited, -.main a, .main a:visited { - color: var(--rfg); -} - -b, strong, i, em { - color: var(--rfg); -} - -sup > a { - background: var(--rbg); -} - -body > input { display:none; } - -#labels { - background: var(--bg2); - color: var(--fg2); -} - -.keywords { - color: var(--fg2); -} -li .keywords { - float: right; -} - -.main ol > li:before, ol > li:before { - color: var(--fg2) -} - -pre::after,pre::before,hr:after, -.main pre::after,.main pre::before,.main hr:after { - color: var(--fg2); -} -nav a, nav a:visited, .main nav a,.main nav a:visited { - color: var(--fg2); -} -#labels label:hover, a:hover, a:active, a:focus, .main a:hover,.main a:active,.main a:focus, -nav a:focus, nav a:hover, .main nav a:focus,.main nav a:hover { - color: var(--l-fg); - background: var(--l-bg); -} - -thead, .main thead, tr:hover, .main tr:hover { - background: var(--rbg); - color: var(--rfg); -} -.description { - color: var(--fg2); -} -h1, .main h1, -h2, .main h2, -h3, .main h3, -h4, .main h4, -h5, .main h5, -h6, .main h6, -{ - color: var(--rfg); -} -table, td, th, -.main table,.main td,.main th { +table, td, th { border-color: var(--bdr); } -code, .main code { - background: var(--rbg); -} -blockquote:after, .main blockquote:after { - color: var(--fg2); -} -#preamble,#postamble,.main #preamble, .main #postamble { - border-color: transparent; -} -.article-date, .main .article-date { - color: var(--fg2); -} -/* -------- */ -/* org colors */ -.todo, .done, .main .todo, .main .done { - background: var(--rbg); - border: solid 1px; - height: 10px; - display: inline-block; - line-height: 12px; - font-weight: bold; - font-size: 10px; -} -.notes, .main .notes { +.notes { background: var(--rbg); color: var(--rfg); + padding: 1em; } /* ---- SYNTAX HIGHLIGHTING ---- */ .org-rainbow-delimiters-depth-1, .org-rainbow-delimiters-depth-9,