@use "sass:map"; @use "../abstracts/settings"; @use "../abstracts/themes"; @use "../abstracts/functions"; // Global Styles body { width: 100%; height: 100%; margin: 0 auto; scroll-behavior: smooth; font-family: settings.$font-stack-sans; font-kerning: normal; font-variant-ligatures: normal; font-feature-settings: "kern", "liga", "calt", "clig", "ss01"; // global base font size: font-size: 0.975em; line-height: 1.5; @include themes.themed( ( background-color: "background-outer", ) ); // set themed lightbulb icons manually &.light button.dark-mode-toggle { background-image: url(themes.$icon-bulb-on); } &.dark button.dark-mode-toggle { background-image: url(themes.$icon-bulb-off); } } code, pre, .monospace { font-family: settings.$font-stack-mono; letter-spacing: normal; } // override above font-family if browser supports variable fonts // https://caniuse.com/#feat=variable-fonts @supports (font-variation-settings: normal) { body { font-family: settings.$font-stack-variable; font-optical-sizing: auto; } code, pre, .monospace { font-family: settings.$font-stack-mono-variable; } } a { text-decoration: none; } // this is what's extended by different layouts (in ../pages) div.layout { max-width: settings.$max-width; margin: 0 auto; display: block; // https://stackoverflow.com/questions/28794718/max-width-not-working-for-ie-11 } // stretch background for entire width of content area main { width: 100%; padding: 0 1.5em; @include themes.themed( ( color: "text", background-color: "background-inner", ) ); a { background-position: 0% 100%; background-repeat: no-repeat; background-size: 0% settings.$link-underline-size; padding-bottom: settings.$link-underline-size; @include themes.themed( $properties: ( color: "links", ), $addTransitions: ( background-size 0.25s ease-in-out, ) ); // cool link underlines via messy SCSS hacking (see ../abstracts/_functions) @each $theme, $map in themes.$themes { @at-root body.#{$theme} #{&} { background-image: functions.underline-hack(map.get($map, "links"), map.get($map, "background-inner")); } } &:hover { background-size: 100% settings.$link-underline-size; } // set an anchor's class to `no-underline` to disable all of this &.no-underline { background: none !important; padding-bottom: 0; } } // page titles h1 { margin-top: 0; letter-spacing: -0.005em; // stylelint-disable-next-line no-descending-specificity a { // disable fancy underline without `.no-underline` color: inherit !important; background: none !important; padding-bottom: 0; } } } // make SVG twemojis relative to surrounding text // https://github.com/twitter/twemoji#inline-styles img.emoji { height: 1.2em; width: 1.2em; margin: 0 0.05em; vertical-align: -0.22em; border: 0; display: inline-block; // have cursor act like it's hovering a regular unicode emoji, especially since twemojis can still be copied/pasted cursor: text; } // need to manually unset text cursor above when emoji's within a link a img.emoji { cursor: inherit; } // Responsive @mixin responsive() { body { // Safari iOS menu bar reappears below 44px: // https://www.eventbrite.com/engineering/mobile-safari-why/ padding-bottom: 45px !important; // Allows you to scroll below the viewport; default value is visible overflow-y: scroll; } main { padding-left: 1.25em; padding-right: 1.25em; } }