mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 21:15:31 -04:00
dark mode 😎 (#112)
* prepare dark mode stuffs * themed all global colors * store preference in local storage * toggle styling * lightbulb position * minify bundled script with uglify-js instead of hugo * detect whether user has an OS-wide dark mode preference and use that by default * two different colors for each homepage link * inline bulb SVGs into stylesheet * fingerprint and cache styles for a year * fix lightbulb positioning with weird magic numbers, will come back to that * themed syntax highlighting * use terser instead of uglify-js (b/c of ES6)
This commit is contained in:
@@ -6,10 +6,13 @@
|
||||
// Calculate lighter underline color compared to text color by
|
||||
// mix()'ing with background (#fff) to give the impression of
|
||||
// opacity but with MUCH better compatibility.
|
||||
$color-opaque: mix($color, $color-background, $link-underline-opacity);
|
||||
$color-opaque-hex: mix($color, $link-opacity-color, $link-underline-opacity);
|
||||
|
||||
// Less compatible but better for light/dark mode switching.
|
||||
$color-opaque-alpha: rgba($color, $link-underline-opacity / 100%);
|
||||
|
||||
// Return non-gradient linear-gradient():
|
||||
@return linear-gradient($color-opaque, $color-opaque);
|
||||
@return linear-gradient($color-opaque-alpha, $color-opaque-alpha);
|
||||
}
|
||||
|
||||
// Web fonts (see components/_fonts.scss)
|
||||
|
Reference in New Issue
Block a user