513 lines
9.8 KiB
CSS
513 lines
9.8 KiB
CSS
/* CSS to be used for HTML Org-mode export
|
||
Author: Yann Esposito
|
||
*/
|
||
|
||
/* Fonts */
|
||
body {
|
||
font: 14px/1.4 monospace;
|
||
line-height: 16px;
|
||
}
|
||
pre, pre code {
|
||
line-height: 1em;
|
||
}
|
||
/* 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;
|
||
}
|
||
h1, h2, h3, h4, h5, h6, pre, code, blockquote, p, ul, ol, section, header,
|
||
figure,table {
|
||
margin-top: 1em;
|
||
margin-bottom: 1em;
|
||
}
|
||
li {
|
||
display: block;
|
||
padding-left: 2ch;
|
||
}
|
||
ol > li:before, ul > li:before {
|
||
content: "– ";
|
||
opacity: 0.5;
|
||
float: left;
|
||
position: relative;
|
||
left: -2ch;
|
||
text-align: right;
|
||
width: 0;
|
||
}
|
||
ol {
|
||
counter-reset: ol;
|
||
}
|
||
ol > li:before {
|
||
content: counter(ol) ". ";
|
||
counter-increment: ol;
|
||
}
|
||
ol > li:nth-child(n+10) {
|
||
padding-left:3ch;
|
||
}
|
||
ol > li:nth-child(n+10):before {
|
||
left: -3ch;
|
||
}
|
||
img {
|
||
width: 100%;
|
||
max-height: 100vh;
|
||
margin: 1em auto;
|
||
}
|
||
p > img, li > img {
|
||
max-height: 1cap;
|
||
width: auto;
|
||
margin: 0;
|
||
vertical-align: middle;
|
||
}
|
||
table {
|
||
display: block; /* for overflow to work */
|
||
max-width: 100%;
|
||
border-collapse: collapse;
|
||
border: solid 1px;
|
||
overflow: scroll;
|
||
}
|
||
td, th {
|
||
height: 1em;
|
||
padding: 0 10px;
|
||
text-align: left;
|
||
vertical-align: middle;
|
||
border-right: solid 1px;
|
||
border-left: solid 1px;
|
||
}
|
||
sup {
|
||
vertical-align: top;
|
||
position: relative;
|
||
top: -.25em;
|
||
}
|
||
sup > a {
|
||
text-decoration: none;
|
||
padding: 1px 2px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
/* Markdown tricks */
|
||
h1,h2,h3,h4,h5,h6 {
|
||
font-size: 1em;
|
||
}
|
||
h1::before {
|
||
content: "# ";
|
||
}
|
||
h2::before {
|
||
content: "## ";
|
||
}
|
||
h3::before {
|
||
content: "### ";
|
||
}
|
||
h4::before {
|
||
content: "#### ";
|
||
}
|
||
h5::before {
|
||
content: "##### ";
|
||
}
|
||
h6::before {
|
||
content: "###### ";
|
||
}
|
||
hr {
|
||
border: 0;
|
||
}
|
||
#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;
|
||
}
|
||
#postamble:before, hr:after {
|
||
text-align: center;
|
||
content: "-----------------------------------------------------------------------------";
|
||
display:block;
|
||
width: 100%;
|
||
overflow: hidden;
|
||
opacity: .5;
|
||
height: 1em;
|
||
}
|
||
pre {
|
||
max-width: 100%;
|
||
overflow-x: scroll;
|
||
overflow-y: hidden;
|
||
}
|
||
pre:after,pre:before {
|
||
content: "~~~~~~~~~";
|
||
display: block; }
|
||
pre:before {
|
||
content: "~~~~~~~~~ " attr(class);
|
||
}
|
||
pre code {
|
||
background: none;
|
||
}
|
||
blockquote,#table-of-contents {
|
||
margin-left: 0;
|
||
position: relative;
|
||
padding-left: 17px;
|
||
padding-left: 2ch;
|
||
overflow: hidden;
|
||
}
|
||
#table-of-contents:after, blockquote:after {
|
||
content: ">\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>";
|
||
white-space: pre;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
}
|
||
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: 48em;
|
||
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 */
|
||
--bg: #000;
|
||
--fg: #0b0;
|
||
--bg2: #040;
|
||
--fg2: #080;
|
||
--rfg: #0f0;
|
||
--rbg: #000;
|
||
--bdr: #080;
|
||
--l-fg: #0f0;
|
||
--l-bg: var(--bg);
|
||
--y: #0f0;
|
||
--o: #0e0;
|
||
--r: #0d0;
|
||
--m: #0f0;
|
||
--v: #0f0;
|
||
--b: #080;
|
||
--c: #080;
|
||
--g: #080;
|
||
--b03: #020;
|
||
--b02: #030;
|
||
--b3: #0f0;
|
||
--b2: #0e0;
|
||
}
|
||
|
||
/* org colors */
|
||
@media (prefers-color-scheme: light) {
|
||
:root {
|
||
--y: #0ff;
|
||
--o: #0ee;
|
||
--r: #0dd;
|
||
--m: #0ff;
|
||
--v: #0ff;
|
||
--b: #088;
|
||
--c: #088;
|
||
--g: #088;
|
||
|
||
--b03: #022;
|
||
--b02: #033;
|
||
--b3: #fff;
|
||
--b2: #cee;
|
||
|
||
--bg: #fff;
|
||
--fg: #055;
|
||
--fg2: #044;
|
||
--bg2: #cff;
|
||
--rfg: #033;
|
||
--rbg: #aee;
|
||
--bdr: #088;
|
||
--l-fg: #000;
|
||
--l-bg: var(--bg);
|
||
}
|
||
}
|
||
/* Dark themes soften and darken images */
|
||
img {
|
||
filter: brightness(0.8) sepia(100%) hue-rotate(55deg) saturate(10);
|
||
}
|
||
@media (prefers-color-scheme: light) {
|
||
img {
|
||
filter: brightness(1.3) sepia(100%) hue-rotate(130deg) saturate(2);
|
||
}
|
||
}
|
||
#h {
|
||
float: left;
|
||
}
|
||
#labels {
|
||
width: 100%;
|
||
text-align: right;
|
||
}
|
||
.main {
|
||
padding-top: 1em;
|
||
min-height: calc(100vh - 2.5em);
|
||
}
|
||
#labels label {
|
||
text-decoration: underline;
|
||
cursor: pointer;
|
||
font-style: italic;
|
||
}
|
||
|
||
/* Light themes does not soften and darken images */
|
||
#l:checked ~ .main img {
|
||
filter: brightness(1.3) sepia(100%) hue-rotate(130deg) saturate(2);
|
||
}
|
||
|
||
#d:checked ~ .main img {
|
||
filter: brightness(0.8) sepia(100%) hue-rotate(55deg) saturate(10);
|
||
}
|
||
|
||
#l:checked ~ * {
|
||
--y: #0ff;
|
||
--o: #0ee;
|
||
--r: #0dd;
|
||
--m: #0ff;
|
||
--v: #0ff;
|
||
--b: #088;
|
||
--c: #088;
|
||
--g: #088;
|
||
|
||
--b03: #022;
|
||
--b02: #033;
|
||
--b3: #fff;
|
||
--b2: #cee;
|
||
|
||
--bg: #fff;
|
||
--fg: #055;
|
||
--fg2: #044;
|
||
--bg2: #cff;
|
||
--rfg: #033;
|
||
--rbg: #aee;
|
||
--bdr: #088;
|
||
--l-fg: #000;
|
||
--l-bg: var(--bg);
|
||
}
|
||
/* --------------------------------------------------------------------------- */
|
||
/* Dark matrix theme selected */
|
||
#d:checked ~ * {
|
||
--bg: #000;
|
||
--fg: #0b0;
|
||
--bg2: #040;
|
||
--fg2: #080;
|
||
--rfg: #0f0;
|
||
--rbg: #000;
|
||
--bdr: #080;
|
||
--l-fg: #0f0;
|
||
--l-bg: var(--bg);
|
||
--y: #0f0;
|
||
--o: #0e0;
|
||
--r: #0d0;
|
||
--m: #0f0;
|
||
--v: #0f0;
|
||
--b: #080;
|
||
--c: #080;
|
||
--g: #080;
|
||
--b03: #020;
|
||
--b02: #030;
|
||
--b3: #0f0;
|
||
--b2: #0e0;
|
||
}
|
||
|
||
/* --------------------------------------------------------------------------- */
|
||
/* Default color theme */
|
||
body,.main {
|
||
background: var(--bg);
|
||
color: var(--fg);
|
||
}
|
||
::selection, .main ::selection,
|
||
::-moz-selection, .main ::-moz-selection {
|
||
color: white;
|
||
background: var(--b);
|
||
}
|
||
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 {
|
||
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 {
|
||
background: var(--rbg);
|
||
color: var(--rfg);
|
||
}
|
||
/* ---- SYNTAX HIGHLIGHTING ---- */
|
||
.org-rainbow-delimiters-depth-1, .org-rainbow-delimiters-depth-9,
|
||
.org-css-selector, .org-nix-attribute, .org-builtin,
|
||
.IN_REVIEW, a {
|
||
color:var(--c);
|
||
}
|
||
|
||
.org-rainbow-delimiters-depth-2, .org-nix-builtin, .org-variable-name,
|
||
.org-function-name, .org-diff-changed {
|
||
color:var(--b);
|
||
}
|
||
|
||
.org-rainbow-delimiters-depth-3, .HOLD, .WAITING {
|
||
color:var(--v);
|
||
}
|
||
|
||
.org-rainbow-delimiters-depth-4, .org-diff-hunk-header, .org-sh-quoted-exec,
|
||
.CANCELED {
|
||
color:var(--m);
|
||
}
|
||
.org-rainbow-delimiters-depth-5, .org-diff-removed, .TODO {
|
||
color:var(--r);
|
||
}
|
||
.org-rainbow-delimiters-depth-6 {
|
||
color:var(--o);
|
||
}
|
||
.org-rainbow-delimiters-depth-7, .org-type, .org-constant, .org-diff-header,
|
||
.IN_PROGRESS {
|
||
color:var(--y);
|
||
}
|
||
.org-rainbow-delimiters-depth-8, .org-sh-heredoc, .org-diff-added, .org-string,
|
||
.org-doc, .org-keyword, .DONE {
|
||
color:var(--g);
|
||
}
|
||
|
||
.org-diff-none, .org-preprocessor, .org-comment-delimiter, .org-comment,
|
||
.org-outshine-level-1, .org-outshine-level-2, .org-outshine-level-3,
|
||
.org-outshine-level-4, .org-outshine-level-5, .org-outshine-level-6,
|
||
.org-outshine-level-7, .org-outshine-level-8, .org-outshine-level-9 {
|
||
color:var(--fg2);
|
||
}
|
||
|
||
.org-highlight-number-number {
|
||
color:var(--rfg);
|
||
}
|