site

personal website, served at mordaunt.dev/site
Log | Files | Refs

_base_dark.scss (1321B)


      1 @mixin base_dark {
      2   color: $fg-color-dark;
      3   background-color: $bg-color-dark;
      4 
      5   a {
      6     color: $link-color-dark;
      7   }
      8 
      9   h1,
     10   h2,
     11   h3,
     12   h4,
     13   h5,
     14   h6 {
     15     color: $alt-fg-color-dark;
     16 
     17     &:hover .heading-link {
     18       visibility: visible;
     19     }
     20 
     21     .heading-link {
     22       color: $link-color-dark;
     23       font-weight: inherit;
     24       text-decoration: none;
     25       font-size: 80%;
     26       visibility: hidden;
     27     }
     28 
     29     .title-link {
     30       color: inherit;
     31       font-weight: inherit;
     32       text-decoration: none;
     33     }
     34   }
     35 
     36   pre code {
     37     background-color: inherit;
     38     color: inherit;
     39   }
     40 
     41   code {
     42     background-color: $lighter-alt-bg-color-dark;
     43     color: $fg-color-dark;
     44   }
     45 
     46   blockquote {
     47     border-left: 2px solid $alt-bg-color-dark;
     48   }
     49 
     50   th,
     51   td {
     52     padding: 1.6rem;
     53   }
     54 
     55   table {
     56     border-collapse: collapse;
     57   }
     58 
     59   table td,
     60   table th {
     61     border: 2px solid $alt-fg-color-dark;
     62   }
     63 
     64   table tr:first-child th {
     65     border-top: 0;
     66   }
     67 
     68   table tr:last-child td {
     69     border-bottom: 0;
     70   }
     71 
     72   table tr td:first-child,
     73   table tr th:first-child {
     74     border-left: 0;
     75   }
     76 
     77   table tr td:last-child,
     78   table tr th:last-child {
     79     border-right: 0;
     80   }
     81 }
     82 
     83 body.colorscheme-dark {
     84   @include base_dark();
     85 }
     86 
     87 body.colorscheme-auto {
     88   @media (prefers-color-scheme: dark) {
     89     @include base_dark();
     90   }
     91 }