davideisinger.com

My personal website
Log | Files | Refs | README

style.scss (3479B)


      1 body {
      2   font-family: "courier", monospace;
      3   font-size: 18px;
      4   padding: 50px;
      5   line-height: 1.5em;
      6   background-color: #f6f6f6;
      7   color: #333;
      8 }
      9 
     10 @media only screen and (max-width: 600px) {
     11   body {
     12     -webkit-text-size-adjust: 100%;
     13     padding: 10px;
     14   }
     15 }
     16 
     17 h1,
     18 h2,
     19 h3 {
     20   font-size: 1em;
     21   margin: 1em 0;
     22 
     23   span {
     24     color: #aaa;
     25   }
     26 }
     27 
     28 h3 {
     29   color: #aaa;
     30 }
     31 
     32 a {
     33   color: #00a;
     34 }
     35 
     36 hr {
     37   border: 0;
     38   border-top: 2px solid #ddd;
     39 }
     40 
     41 ul {
     42   list-style: none;
     43   padding: 0 0 0 2ch;
     44   position: relative;
     45 
     46   >li {
     47     &::before {
     48       color: #aaa;
     49       content: '∗';
     50       left: 0ch;
     51       position: absolute;
     52     }
     53   }
     54 }
     55 
     56 ol {
     57   margin: 0;
     58   padding: 0;
     59   counter-reset: item;
     60 
     61 
     62   li {
     63     counter-increment: item;
     64     display: table;
     65     table-layout: fixed;
     66     width: 100%;
     67   }
     68 
     69   li::before {
     70     content: counter(item) ".";
     71     display: table-cell;
     72     padding-right: 1ch;
     73     white-space: nowrap;
     74     width: 3ch;
     75   }
     76 
     77   &+a.footnote-backref {
     78     margin-left: -1ch;
     79   }
     80 }
     81 
     82 blockquote {
     83   border-left: 1ch solid #ddd;
     84   font-style: italic;
     85   margin: 0;
     86   padding-left: 1ch;
     87 
     88   em {
     89     font-style: normal;
     90   }
     91 }
     92 
     93 header,
     94 #content,
     95 footer {
     96   max-width: 800px;
     97 }
     98 
     99 footer {
    100   color: #aaa;
    101   text-align: center;
    102 
    103   hr {
    104     margin-bottom: 12px;
    105   }
    106 }
    107 
    108 @media only screen and (max-width: 600px) {
    109   footer {
    110     text-align: left;
    111 
    112     a {
    113       display: block;
    114     }
    115 
    116     .mobile-hidden {
    117       display: none;
    118     }
    119   }
    120 }
    121 
    122 sup {
    123   line-height: 0;
    124   font-size: 0.8em;
    125 }
    126 
    127 
    128 .nowrap {
    129   white-space: nowrap;
    130 }
    131 
    132 .references,
    133 .footnotes {
    134   font-size: 0.8em;
    135 
    136   h3 {
    137     margin-bottom: 0;
    138   }
    139 
    140   ul {
    141     margin-top: 0.5em;
    142   }
    143 }
    144 
    145 // IMAGES
    146 
    147 figure {
    148   margin: 0;
    149 }
    150 
    151 img {
    152   mix-blend-mode: multiply;
    153   width: 100%;
    154   height: auto;
    155 
    156   &.inline {
    157     width: auto;
    158     vertical-align: middle;
    159   }
    160 }
    161 
    162 p:has(img) {
    163   display: flex;
    164   gap: 1em;
    165   margin-block-start: 1em;
    166   margin-block-end: 1em;
    167   align-items: center;
    168 
    169   a {
    170     line-height: 0;
    171   }
    172 }
    173 
    174 a:has(> img.float-right) {
    175   display: block;
    176   float: right;
    177   width: 50%;
    178   margin: 0 0 1em 1.5em;
    179   line-height: 0;
    180 }
    181 
    182 @media only screen and (max-width: 600px) {
    183   a:has(> img.float-right) {
    184     float: none;
    185     width: 100%;
    186     margin: 1em 0;
    187   }
    188 }
    189 
    190 // CODE
    191 
    192 code {
    193   background-color: #ddd;
    194   border-radius: 3px;
    195   font-family: "courier", monospace;
    196   padding: 1px 1ch;
    197 }
    198 
    199 .highlight,
    200 pre {
    201   overflow: auto;
    202 
    203   code {
    204     background: none;
    205     padding: 0;
    206     border-radius: 0;
    207   }
    208 }
    209 
    210 pre {
    211   background-color: #2e3440;
    212   color: #d8dee9;
    213   margin: 0;
    214   padding: 1ch 1ch;
    215   border-radius: 3px;
    216 }
    217 
    218 // AUDIO
    219 
    220 .music-track {
    221   align-items: center;
    222   display: flex;
    223   gap: 2ch;
    224   padding: 2ch 0;
    225 }
    226 
    227 @media only screen and (max-width: 600px) {
    228   .music-track {
    229     display: block;
    230 
    231     audio {
    232       padding-bottom: 1ch;
    233     }
    234   }
    235 }
    236 
    237 audio::-webkit-media-controls-panel {
    238   background-color: rgba(0, 0, 0, 0.05);
    239 }
    240 
    241 @media print {
    242   body {
    243     background-color: white;
    244     font-size: 18px;
    245     padding: 0;
    246   }
    247 
    248   @page {
    249     size: a5;
    250     margin: 1in 0.8in;
    251   }
    252 
    253   footer {
    254     display: none;
    255   }
    256 
    257   h2,
    258   h3,
    259   hr {
    260     page-break-after: avoid;
    261   }
    262 
    263   blockquote,
    264   li {
    265     page-break-inside: avoid;
    266   }
    267 
    268   #content {
    269     max-width: none;
    270   }
    271 
    272   .page-break {
    273     page-break-after: always;
    274   }
    275 
    276   a.footnote-backref {
    277     display: none;
    278   }
    279 
    280   code {
    281     background: none;
    282     border-radius: 0;
    283     padding: 0;
    284 
    285     &::before,
    286     &::after {
    287       content: "`"
    288     }
    289   }
    290 
    291   ol {
    292     p {
    293       display: inline;
    294     }
    295   }
    296 }