-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
962 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
@use "sass:color"; | ||
@use "./variables" as *; | ||
|
||
@mixin theme-dark { | ||
$color-link: color.adjust($color-link, $lightness: +10%); | ||
|
||
color-scheme: dark; | ||
|
||
--color-text: #{$color-paper}; | ||
--color-link: #{$color-link}; | ||
--color-link-visited: #{color.adjust($color-link, $lightness: -20%)}; | ||
--color-link-hover: #{color.adjust($color-link, $lightness: +10%)}; | ||
--color-link-disabled: #{color.adjust($color-link, $saturation: -20%)}; | ||
|
||
--color-front: #{$color-desk}; | ||
--color-back: #{$color-dark}; | ||
--color-accent: #{$color-accent}; | ||
|
||
--color-admonition-caution: #{$color-admonition-caution}; | ||
--color-admonition-important: #{$color-admonition-important}; | ||
--color-admonition-note: #{$color-admonition-note}; | ||
--color-admonition-tip: #{$color-admonition-tip}; | ||
--color-admonition-warning: #{$color-admonition-warning}; | ||
|
||
--color-admonition-caution-border: #{color.adjust($color-admonition-caution, $lightness: +10%)}; | ||
--color-admonition-important-border: #{color.adjust($color-admonition-important, $lightness: +10%)}; | ||
--color-admonition-note-border: #{color.adjust($color-admonition-note, $lightness: +10%)}; | ||
--color-admonition-tip-border: #{color.adjust($color-admonition-tip, $lightness: +10%)}; | ||
--color-admonition-warning-border: #{color.adjust($color-admonition-warning, $lightness: +10%)}; | ||
} | ||
|
||
@mixin theme-light { | ||
color-scheme: light; | ||
|
||
--color-link: #{$color-link}; | ||
--color-link-visited: #{color.adjust($color-link, $lightness: -20%)}; | ||
--color-link-hover: #{color.adjust($color-link, $lightness: +10%)}; | ||
--color-link-disabled: #{color.adjust($color-link, $saturation: -20%)}; | ||
|
||
--color-text: #{$color-dark}; | ||
--color-front: #{$color-paper}; | ||
--color-back: #{$color-desk}; | ||
--color-accent: #{$color-accent}; | ||
|
||
--color-admonition-caution: #{$color-admonition-caution}; | ||
--color-admonition-important: #{$color-admonition-important}; | ||
--color-admonition-note: #{$color-admonition-note}; | ||
--color-admonition-tip: #{$color-admonition-tip}; | ||
--color-admonition-warning: #{$color-admonition-warning}; | ||
|
||
--color-admonition-caution-border: #{color.adjust($color-admonition-caution, $lightness: -10%)}; | ||
--color-admonition-important-border: #{color.adjust($color-admonition-important, $lightness: -10%)}; | ||
--color-admonition-note-border: #{color.adjust($color-admonition-note, $lightness: -10%)}; | ||
--color-admonition-tip-border: #{color.adjust($color-admonition-tip, $lightness: -10%)}; | ||
--color-admonition-warning-border: #{color.adjust($color-admonition-warning, $lightness: -10%)}; | ||
} | ||
|
||
@mixin max-mobile { | ||
@media screen and (max-width: $width-mobile) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin max-tablet { | ||
@media screen and (max-width: $width-tablet) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin min-tablet { | ||
@media screen and (min-width: $width-tablet) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin max-desktop { | ||
@media screen and (max-width: $width-desktop) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin min-desktop { | ||
@media screen and (min-width: $width-desktop) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin print { | ||
@media print { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin container { | ||
@include min-desktop { | ||
width: $width-desktop; | ||
} | ||
|
||
width: 100%; | ||
max-width: 100vw; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@use "../fonts/cascadia"; | ||
@use "../fonts/lato"; | ||
@use "../fonts/gelasio"; | ||
|
||
// TODO: Replace with local copies | ||
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap'); | ||
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap'); | ||
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;700&display=swap'); | ||
@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); | ||
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@forward "./reset"; | ||
@forward "./themes"; | ||
@forward "./typography"; | ||
@forward "./typography"; | ||
@forward "./utilities"; | ||
@forward "./fonts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
1. Use a more-intuitive box-sizing model. | ||
*/ | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
|
||
/* | ||
2. Remove default margin | ||
*/ | ||
* { | ||
margin: 0; | ||
} | ||
|
||
/* | ||
Typographic tweaks! | ||
3. Add accessible line-height | ||
4. Improve text rendering | ||
*/ | ||
body { | ||
line-height: 1.5; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
||
/* | ||
5. Improve media defaults | ||
*/ | ||
img, | ||
picture, | ||
video, | ||
canvas, | ||
svg { | ||
display: block; | ||
max-width: 100%; | ||
} | ||
|
||
/* | ||
6. Remove built-in form typography styles | ||
*/ | ||
input, | ||
button, | ||
textarea, | ||
select { | ||
font: inherit; | ||
} | ||
|
||
/* | ||
7. Avoid text overflows | ||
*/ | ||
p, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
overflow-wrap: break-word; | ||
} | ||
|
||
/* | ||
8. Create a root stacking context | ||
*/ | ||
#root, | ||
#__next { | ||
isolation: isolate; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
@use "../abstracts" as *; | ||
|
||
:root { | ||
--font-header: $font-header; | ||
--font-text: $font-text; | ||
--font-code: $font-code; | ||
--font-navigation: $font-navigation; | ||
|
||
--color-paper: $color-paper; | ||
--color-desk: $color-desk; | ||
--color-dark: $color-dark; | ||
--color-light: $color-light; | ||
--color-link: $color-link; | ||
--font-header: #{$font-header}; | ||
--font-text: #{$font-text}; | ||
--font-code: #{$font-code}; | ||
--font-navigation: #{$font-navigation}; | ||
} | ||
|
||
--width-desktop: $width-desktop; | ||
--width-tablet: $width-tablet; | ||
--width-mobile: $width-mobile; | ||
// NB: light theme is the default (due to the :not) | ||
html[data-theme=light], | ||
html:not([data-theme=dark]) { | ||
@include theme-light; | ||
} | ||
|
||
html[data-theme=dark] { | ||
|
||
@include theme-dark; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
|
||
// `data-theme` overrides `prefers-color-scheme` | ||
html:not([data-theme=light]) { | ||
@include theme-dark; | ||
} | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
|
||
// `data-theme` overrides `prefers-color-scheme` | ||
html:not([data-theme=dark]) { | ||
@include theme-light; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@use "./themes" as *; | ||
|
||
html { | ||
font-family: var(--font-text); | ||
} | ||
|
||
* { | ||
scrollbar-width: thin; | ||
} | ||
|
||
a { | ||
color: var(--color-link); | ||
text-decoration: none; | ||
|
||
&:not(:disabled):hover { | ||
color: var(--color-link-hover); | ||
text-decoration: underline; | ||
} | ||
|
||
&:disabled { | ||
color: var(--color-disabled); | ||
} | ||
} |
Oops, something went wrong.