massi-world

this website of mine
Log | Files | Refs

style.templ.css (4873B)


      1 :root {
      2   --dark-bg: #1d2c3a;
      3   --dark-fg: #acbdcf;
      4   --dark-link: white;
      5 
      6   --light-bg: #def0ff;
      7   --light-fg: #455564;
      8   --light-link: black;
      9 
     10   --bg: var(--light-bg);
     11   --fg: var(--light-fg);
     12   --link: var(--light-link);
     13 }
     14 
     15 @media (prefers-color-scheme: dark) {
     16   :root {
     17     --bg: var(--dark-bg);
     18     --fg: var(--dark-fg);
     19     --link: var(--dark-link);
     20   }
     21 }
     22 
     23 @media (max-width: 600px) {
     24   header {
     25     line-height: 1.2;
     26   }
     27 }
     28 
     29 html {
     30   font-size: 20px;
     31   color: var(--fg);
     32   background: var(--bg);
     33   font-family:
     34     Courier New,
     35     monospace;
     36 }
     37 
     38 body {
     39   box-sizing: border-box;
     40   line-height: 1.6;
     41   margin: 0px auto;
     42   max-width: 40rem;
     43   min-height: 100vh;
     44   min-height: 100dvh;
     45   padding: 0.75rem 0.75rem 10rem 0.75rem;
     46   position: relative;
     47 }
     48 
     49 footer {
     50   position: absolute;
     51   bottom: 0;
     52   padding: 0.75rem 0;
     53 }
     54 
     55 a {
     56   color: var(--link);
     57   text-decoration: 1px underline;
     58   text-underline-offset: 0.2em;
     59 }
     60 
     61 .md h1 {
     62   font-size: 1.4rem;
     63   font-weight: bold;
     64   margin: 2rem 0 1rem;
     65 }
     66 
     67 .md p,
     68 .md ul,
     69 .md ol {
     70   margin-top: 0;
     71 }
     72 
     73 h1 > a,
     74 h2 > a,
     75 h3 > a,
     76 h4 > a {
     77   color: inherit;
     78   text-decoration: none;
     79   position: relative;
     80 }
     81 
     82 #svg-arrow {
     83   vertical-align: middle;
     84   width: 1em;
     85   height: 1em;
     86   padding: 0 0.4em;
     87 }
     88 
     89 header {
     90   display: flex;
     91   flex-wrap: wrap;
     92   justify-items: flex-start;
     93   font-size: 1.2rem;
     94   padding-bottom: 3rem;
     95 }
     96 
     97 header > span {
     98   display: flex;
     99   align-items: center;
    100 }
    101 
    102 header > span:not(:last-child) {
    103 }
    104 
    105 header a {
    106   color: inherit;
    107   text-decoration: none;
    108 }
    109 
    110 header a:hover {
    111   text-decoration: 1px underline;
    112 }
    113 
    114 header span:last-child a {
    115   font-size: 2rem;
    116   text-decoration: none;
    117 }
    118 
    119 .flex-break {
    120   flex-basis: 100%;
    121   width: 0;
    122   height: 0;
    123 }
    124 
    125 ul {
    126   margin-left: -1rem;
    127 }
    128 
    129 h1:hover > a::after,
    130 h2:hover > a::after,
    131 h3:hover > a::after,
    132 h4:hover > a::after {
    133   content: "🔗";
    134   position: absolute;
    135   right: -1.2rem;
    136   font-size: 0.8rem;
    137   top: 0;
    138   bottom: 0;
    139   align-content: center;
    140 }
    141 
    142 ul > li {
    143   list-style: url("@(web-root)/shared/assets/spiral-for-light-mode.svg");
    144 }
    145 
    146 @media (prefers-color-scheme: dark) {
    147   ul > li {
    148     list-style: url("@(web-root)/shared/assets/spiral-for-dark-mode.svg");
    149   }
    150 }
    151 
    152 .color-synth .samples {
    153   display: flex;
    154   max-width: 100%;
    155 }
    156 
    157 .color-synth .samples > * {
    158   flex: auto;
    159   min-width: 1px;
    160   margin: 0 0 0.5rem 0.5rem;
    161   border-radius: 0.2rem;
    162 }
    163 
    164 .color-synth .samples > *:first-child {
    165   margin-left: 0;
    166 }
    167 
    168 @media (max-width: 600px) {
    169   html {
    170     font-size: 18px;
    171   }
    172   header {
    173     padding-bottom: 2rem;
    174   }
    175   .color-synth .samples {
    176     flex-wrap: wrap;
    177   }
    178   .color-synth .samples > * {
    179     max-width: calc(50% - 0.25rem);
    180   }
    181   .color-synth .samples > *:nth-child(2n + 1) {
    182     margin-left: 0;
    183   }
    184 }
    185 
    186 /* projects/swatchbuckler: */
    187 
    188 .sb-gradient {
    189   display: flex;
    190   flex-direction: column;
    191 }
    192 
    193 .sb-gradient > div {
    194   display: flex;
    195 }
    196 
    197 .gradient-swatch {
    198   height: 50px;
    199   width: 100px;
    200 }
    201 
    202 picture,
    203 picture img {
    204   max-width: 100%;
    205 }
    206 
    207 header span:last-child img {
    208   height: 2rem;
    209   padding: 0 0.3rem;
    210 }
    211 
    212 :root {
    213   --world-size: 60px;
    214 }
    215 
    216 #the-world {
    217   position: relative;
    218   width: var(--world-size);
    219   height: var(--world-size);
    220   background-image: url("@(web-root)/shared/assets/mw-spritesheet.png");
    221   background-size: auto 100%;
    222   image-rendering: pixelated;
    223   transition: transform 5s ease-out;
    224 }
    225 
    226 p:first-child {
    227   margin-top: 0;
    228 }
    229 
    230 header.home-header {
    231   display: flex;
    232   justify-content: center;
    233   padding: 1rem 0 1.75rem;
    234 }
    235 
    236 .header-home:not(:last-child) {
    237   --world-size: 30px;
    238 }
    239 
    240 header {
    241   line-height: 1.4;
    242 }
    243 
    244 header a {
    245   display: inline-flex;
    246   align-items: center;
    247 }
    248 
    249 .header-home #contains-the-world {
    250   position: absolute;
    251   right: 100%;
    252 }
    253 
    254 #contains-the-world {
    255   display: inline-block;
    256   width: var(--world-size);
    257   height: var(--world-size);
    258   position: relative;
    259 }
    260 
    261 @media (max-width: 600px) {
    262   :root {
    263     --world-size: 60px;
    264   }
    265   .header-home:not(:last-child) {
    266     --world-size: 40px;
    267   }
    268 }
    269 
    270 @font-face {
    271   font-family: "Playfair Display";
    272   src: local("Playfair Display"),
    273     url("@(web-root)/shared/fonts/PlayfairDisplay-VariableFont_wght.ttf");
    274 }
    275 
    276 @font-face {
    277   font-family: "Atkinson Hyperlegible";
    278   src: local("Atkinson Hyperlegible"),
    279     url("@(web-root)/shared/fonts/Atkinson-Hyperlegible-Regular-102.ttf");
    280 }
    281 
    282 @font-face {
    283   font-family: "Atkinson Hyperlegible";
    284   font-weight: 500 900;
    285   src: local("Atkinson Hyperlegible Bold"),
    286     url("@(web-root)/shared/fonts/Atkinson-Hyperlegible-Bold-102.ttf");
    287 }
    288 
    289 @font-face {
    290   font-family: "Atkinson Hyperlegible";
    291   font-style: oblique;
    292   src: local("Atkinson Hyperlegible Italic"),
    293     url("@(web-root)/shared/fonts/Atkinson-Hyperlegible-Italic-102.ttf");
    294 }
    295 
    296 @font-face {
    297   font-family: "Atkinson Hyperlegible";
    298   font-weight: 500 900;
    299   font-style: oblique;
    300   src: local("Atkinson Hyperlegible Bold Italic"),
    301     url("@(web-root)/shared/fonts/Atkinson-Hyperlegible-BoldItalic-102.ttf");
    302 }