1 /*!github.com/mina86/mina86.com*/
5 @atom-cls: .a; /* Feed links in Categories */
6 @header-link-li-cls: .b; /* LIs in the header excluding site name and cog */
7 @header-cog-li-cls: .c; /* LI in the header with the cog settings link */
8 @header-site-li-cls: .d; /* LI in the header with the H1 with site name */
12 @linked-in-link-cls: .i;
14 @categories-dd-ul-cls: .k;
15 @left-align-cls: .l; /* text-align: left */
16 @drop-down-ul-cls: .m;
17 @contact-dd-ul-cls: .n;
19 @right-align-cls: .r; /* text-align: right */
20 @dd-selected-cls: .s; /* Selected’s drop down’s A plus if non-setting drop
21 down shown this is added to body. */
22 @article-text-cls: .t;
29 @float-right-cls: .fr;
31 @meta-label-cls: .lb; /* The ‘Posted in categories:’ */
32 @small-cls: .sm; /* font-size: @small */
33 @news-image-cls: .nw; /* FIGURE on Site News pages */
36 @dark-toggle-cls: .td;
37 @contrast-toggle-cls: .tc;
38 @no-print-cls: .np; /* Don’t print. */
39 @no-print-link-cls: .nl; /* Don’t include link’s href in print. */
41 /**** Identifiers ****/
43 @main-id: #b; /* The MAIN element */
44 @comments-id: #c; /* Comments under a post */
45 @dark-theme-id: #d; /* ID set on HTML when dark theme is used */
46 @head-id: #h; /* The header */
47 @categories-id: #k; /* The Categories section in bottom nav */
48 /* Reserve #m for more links if those ever come back. */
49 @contact-id: #n; /* The Contact section in bottom nav */
50 @pagination-id: #p; /* Pagination at the bottom of a page */
51 @high-contrast-id: #t; /* ID set on BODY when high contrast scheme is used */
52 @nav-id: #v; /* The bottom navigation section */
56 @bg-colour: var(--a); @bg-colour-var: --a;
58 @fg-low-colour: var(--c);
60 @border-colour: var(--e);
61 @link-colour: var(--f);
62 @visited-colour: var(--g);
63 @hover-colour: var(--h);
64 @code-colour: var(--i);
65 @acc-bg-colour: var(--j); /* Used in SVG images */
66 @head-bg-colour: var(--k);
67 @head-colour: var(--l);
68 @nav-bg-colour: var(--m);
69 @nav-colour: var(--n);
71 @nav-link-colour: @head-colour;
72 @nav-hover-colour: var(--p); @nav-hover-colour-var: --p;
73 @nav-header-colour: var(--q);
75 @scroll-bar-width: var(--s,1rem);
77 @float-with: var(--w);
78 @slide-position: var(--x, 66%);
80 @slide-colour: var(--z);
102 /* Sizes based on five-note typographic scale with ratio of two (see
103 <http://spencermortensen.com/articles/typographic-scale/>). Numbers are
104 rounded to be multiple of 1/8 so that whatever they are they give an integer
105 when multiple by 16px default font-size used by browsers. Other sizes in
106 this CSS are kept to be multiples of 1/8 as well to minimise non-integer
108 @tiny: 0.75em; /* = 6/8 ≈ 2^-0.4 */
109 @small: 0.875em; /* = 7/8 ≈ 2^-0.2 */
110 @large: 1.25em; /* = 10/8 ≈ 2^0.4 */
111 @huge: 1.5em; /* = 12/8 ≈ 2^0.6 */
112 @title: 1.75em; /* = 14/8 ≈ 2^0.8 */
118 @body-font: Libre Baskerville, Georgia, Charter, Utopia, serif;
119 @mono-font: DejaVu Sans Mono, Source Code Pro, Liberation Mono, Courier New, monospace;
120 @sans-font: DejaVu Sans, Noto Sans, Verdana, sans-serif;
121 @head-font: M, cursive;
123 @import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Noto+Sans:ital,wght@0,400;0,700;1,400&display=swap');
124 @import url('https://fonts.googleapis.com/css2?family=Noto+Emoji');
131 src: url(9N7Su-yV.woff2) format('woff2');
135 /**** Utility mixins ****/
139 display: none !important;
143 font-family: M, var(--S);
149 box-sizing: border-box;
156 background: @bg-colour;
160 font-family: var(--B);
161 font-variant: common-ligatures oldstyle-nums proportional-nums;
162 text-rendering: optimizelegibility;
165 scroll-padding: 4rem;
170 font-family: var(--S);
174 /**** Page layout ****/
176 @{main-id} a:after, @{header-link-li-cls} > a:after {
184 scrollbar-color: @nav-bg-colour @bg-colour;
186 body::-webkit-scrollbar {
189 body::-webkit-scrollbar-track {
190 background: @bg-colour;
192 body::-webkit-scrollbar-thumb {
193 background: @nav-bg-colour;
194 border-radius: .2rem;
195 border: 1px solid @bg-colour;
199 flex-direction: column;
204 box-shadow: 0 .5rem 0.5rem -.5rem inset #000;
214 text-decoration: none;
216 text-underline-offset: 0.125rem;
219 color: @visited-colour;
222 color: @hover-colour;
224 h1 a:visited, h1 a:hover, h1 a:focus {
229 @{article-text-cls} a {
230 text-decoration: underline dotted;
233 text-decoration: none;
237 text-decoration: underline;
239 @{article-text-cls} {
240 a[href^="https://"]:after,
241 a[href^="http://"]:after,
242 a[href^="//"]:after {
245 vertical-align: super;
246 display: inline-block;
260 font-family: var(--S);
261 background: @head-bg-colour linear-gradient(#000, @head-bg-colour);
264 box-shadow: 0 0 1rem 0 #000;
270 font-family: @head-font;
272 /* This uses ‘em’ so that it scales as font-size of the header
273 is changed when page scrolls. Header’s font-size varies
274 from 1rem to 0.5rem. */
285 box-shadow: 0 0 0 2px @head-bg-colour,
286 0 0 1px 4px @nav-colour;
298 display: inline-block;
301 /* Set style of all but the first link. This works because the first link has
302 an H1 in between LI and A so this rule doesn’t match. */
305 text-transform: uppercase;
310 @{header-site-li-cls} {
313 @{header-link-li-cls} > a {
316 @{header-link-li-cls} > a:after {
319 li@{header-cog-li-cls} {
322 @{header-link-li-cls} > a:after, @{header-cog-li-cls} > a {
323 display: inline-block;
324 transition: all .35s;
326 @{header-link-li-cls}@{dd-selected-cls} a:after {
327 transform: translateY(.5em);
330 @{header-cog-li-cls}@{dd-selected-cls} > a {
331 transform: rotate(90deg);
334 /* Hide elements of the header if the screen is too narrow */
335 @media (max-width: 45em) {
336 @{header-link-li-cls}:nth-child(3) { display: none; }
338 @media (max-width: 40em) {
339 @{header-link-li-cls}:nth-child(4) { display: none; }
341 @media (max-width: 31em) {
342 @{header-link-li-cls}:nth-child(2) { display: none; }
344 @media (max-width: 20em) {
345 li@{header-cog-li-cls} { display: none; }
360 @media (min-width: 52rem) {
361 article, @{pagination-id} {
380 color: @border-colour;
381 background: @bg-colour url(DATA<separator.svg>) 50% 50% / 6.45em 1em no-repeat;
382 background-blend-mode: luminosity;
389 @{head-id} @{drop-down-ul-cls} {
395 top: max(3.5em, 2rem);
397 box-shadow: 0 0 0.5rem 0.2rem #000;
402 @{head-id} @{dd-selected-cls} @{drop-down-ul-cls} {
435 margin: 4rem auto 6rem;
448 box-shadow: 0 0 0 2px @bg-colour,
449 0 0 1px 4px @hover-colour;
458 color: @fg-low-colour;
461 margin-bottom: (round(1.5em / @small, 2));
462 a:visited, a:hover, a:focus {
477 @{article-text-cls} {
482 margin: (round(2em / @huge, 2)) 0 (round(1em / @huge, 2));
486 margin: (round(1em / @large, 2)) 0;
503 margin-top: (round(2em / @small, 2));
504 background: linear-gradient(to right, @border-colour 70%, @bg-colour) no-repeat 0 0/40% 1px;
506 p[id^=f] + p[id^=f] {
514 color: @fg-low-colour;
534 /* ‘See comments’/‘Continue reading’ link */
537 margin-bottom: 0.5em;
551 li@{meta-label-cls} {
558 @{meta-label-cls}:before {
568 /* Misc formatting */
570 font-variant: lining-nums slashed-zero;
573 h1, h2, h3 { code, kbd { color: inherit; } }
575 font-family: var(--S);
579 pre, pre code, pre kbd {
580 font-family: @mono-font;
584 padding: .5em ~"min(1.5em, 2vw)";
586 max-width: ~"calc(100vw - 2rem - @{scroll-bar-width})";
590 font-family: @body-font;
594 max-width: ~"calc(100vw - 4rem - @{scroll-bar-width})";
599 margin: 0.5rem 3em 0.5rem 0.5em;
601 background: @bg-colour url(DATA<quote.svg>) 0 0 / 2em 2em no-repeat;
602 background-blend-mode: luminosity;
604 blockquote > :first-child { margin-top: 0; }
605 blockquote > :last-child { margin-bottom: 0; }
609 font-variant-numeric: tabular-nums;
610 font-variant: lining-nums tabular-nums;
611 border-collapse: collapse;
618 padding: 0.25em 0.5em;
624 thead, tfoot, thead + tbody, tbody + tbody {
625 border-top: 1px solid @border-colour;
631 list-style: lower-roman;
665 @{float-right-cls}, @{float-left-cls} {
666 figcaption { margin: 0; }
680 background: url(DATA<pl.svg>) 0 50% / 1.12em .7em no-repeat;
684 background-image: url(DATA<uk.svg>);
693 width: min(60rem, 95%);
707 /**** Bottom Navigation and Drop Downs ****/
709 @{nav-id}, @{drop-down-ul-cls} {
710 font-family: var(--S);
711 background: @nav-bg-colour;
715 @{atom-cls}, @{bluesky-cls}, @{linked-in-link-cls}, @{code-dd-ul-cls} li::marker {
725 justify-content: space-around;
739 border-bottom: 2px dotted currentcolor;
740 color: @nav-header-colour;
749 @{nav-id}, @{head-id} @{drop-down-ul-cls} {
751 color: @nav-link-colour;
754 color: @nav-hover-colour;
757 text-decoration: underline;
761 box-shadow: 0 0 0 2px @nav-bg-colour,
762 0 0 1px 4px @nav-hover-colour;
769 @{categories-dd-ul-cls} {
781 padding: 0 (round(1.5em / @tiny, 2))
782 0 (round(3em / @tiny, 2));
786 @{nav-hover-colour-var}: #ea7d31;
803 li:last-child::marker {
808 display: inline-block;
814 @{linked-in-link-cls} {
815 @{nav-hover-colour-var}: #0977b5;
817 @{contact-dd-ul-cls} {
829 flex-direction: column;
831 @{contact-id} @{contact-dd-ul-cls} {
834 @{contact-id} @{contact-dd-ul-cls} + h2 {
838 @{contact-dd-ul-cls} {
847 li:nth-child(2)::before {
850 li:nth-child(3)::before {
857 @{header-cog-li-cls} {
868 border: 2px solid #000;
878 display: inline-block;
881 border-radius: (0.45em / 2);
882 background: @slide-colour;
887 box-sizing: border-box;
897 box-sizing: border-box;
901 top: ((0.45em - 0.8em) / 2);
902 left: (0.1em - 0.8em / 2);
905 border-radius: (0.8em / 2);
906 border: 2px solid @nav-link-colour;
907 background: @nav-link-colour;
908 transition: transform 0.15s;
911 background: @nav-hover-colour;
914 background: @nav-header-colour;
919 box-shadow: 0 0 0 2px @nav-bg-colour,
920 0 0 1px 4px @nav-link-colour;
923 @{dark-toggle-cls}:before {
927 @{dark-theme-id} & { content: '☾'; }
929 @{contrast-toggle-cls}:before {
935 @{dark-theme-id} @{dark-toggle-cls}:after,
936 @{high-contrast-id} @{contrast-toggle-cls}:after {
937 transform: translateX(1.3em);
944 @{hue-slide-cls} div {
947 inset: -5px auto -5px calc(@slide-position - 5px);
948 border: 2px solid #000;
949 background: @slide-colour;
953 /* Citation dialogue and settings shade */
958 background: @nav-bg-colour;
961 box-shadow: 0 0 0.5rem 0.2rem #000;
967 /* Setting size on td and th individually rather than on dialog
968 so it’s simple to override with ‘thead th’ and ‘tbody td’
975 background: @head-bg-colour;
978 background: @head-bg-colour;
984 padding: .5rem .875rem;
991 white-space: pre-wrap;
997 @media (max-width: 30em) {
1002 padding: .25rem .5rem;
1008 padding: 0.25em 0.5em;
1012 background: @head-colour;
1014 display: inline-block;
1015 box-shadow: 0px -1px 0px 0px #0004 inset;
1016 border: 1px solid #000;
1020 box-shadow: 0px -1px 0px 0px #000 inset;
1022 button:focus-visible {
1024 box-shadow: 0px -1px 0px 0px #000 inset,
1025 0 0 0 2px @nav-bg-colour,
1026 0 0 1px 4px @nav-link-colour;
1029 @{nav-id}::after, dialog::backdrop {
1031 backdrop-filter: blur(2px);
1040 transition: visibility .5s, opacity .5s;
1043 /* TODO: Replace this with body:has(.s) once :has reaches over 95% support. At
1044 the moment, Firefox is lagging behind and dragging support down to 92%. With
1045 that change, it won’t be necessary for JavaScript to set .s on BODY any
1047 @{dd-selected-cls} > @{nav-id}::after {
1049 visibility: visible;
1050 transition: visibility 0s, opacity .5s;
1055 @{float-right-cls}, @{float-left-cls} {
1057 width: var(--w,20em);
1058 margin: 1em ~"clamp(-1em - var(--w,20em),26em - 50vw,1em)";
1061 @{float-right-cls} {
1070 @{right-align-cls} {
1081 abbr, @{unicode-name} {
1082 font-variant: all-small-caps;
1086 /* Print-specific */
1089 display: none !important;
1096 font-size: unit(@tiny, rem);
1099 @{article-text-cls} a:not(@{no-print-link-cls}) {
1100 &[href^="http://"]:after, &[href^="https://"]:after {
1101 content: " 〈" attr(href) "〉";
1103 &[href^="/"]:after {
1104 content: " 〈mina86.com" attr(href) "〉";
1106 &[href^="//"]:after {
1107 content: " 〈https:" attr(href) "〉";
1110 @{main-id} h1 a[href^="/"]:after {
1111 content: "https://mina86.com" attr(href);
1113 color: @fg-low-colour;
1116 @{nav-id} section, @{nav-id} h1, @{nav-id} h2 {
1119 @{nav-id} @{contact-id} {
1124 @{float-right-cls} {