Files
blog/sass/_general.scss
2024-06-09 18:44:59 +03:00

77 lines
1.6 KiB
SCSS

* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
// scrollbar-color: var(--primary-color) transparent;
accent-color: var(--primary-color);
font-size: 16px;
overflow-wrap: break-word;
// Smaller font size on mobile
// @media only screen and (max-width: 480px) {
// font-size: 14px;
// }
}
html,
body {
margin: 0;
padding: 0;
}
body {
display: grid; // Put footer at the bottom for short pages, such as the 404
grid-template-rows: auto minmax(auto, 1fr) auto; // Header, stuff, footer
background: var(--bg-color), var(--primary-color);
min-height: 100vh;
color: var(--fg-color);
line-height: 1.6;
font-family: var(--font-system-ui), var(--font-emoji);
}
// Style text selection to use primary color
::selection {
background-color: var(--primary-color);
color: var(--fg-color);
}
// Make focused anchor not get covered by nav,
// and flash it with primary color when jumping to it
:target:not(#main) {
animation: var(--transition-long) 1s highlight-in-out;
scroll-margin-top: 20vh;
color: var(--primary-color);
text-shadow: var(--primary-color-alpha) 0 0 4px, var(--primary-color) 0 0 12px;
@keyframes highlight-in-out {
50% {
letter-spacing: 0.0125em;
}
}
}
:focus-visible {
animation: focus-in var(--transition);
outline: 0.125rem solid var(--primary-color);
outline-offset: 2px;
}
@supports not selector(:focus-visible) {
:focus {
animation: focus-in var(--transition);
outline: 0.125rem solid var(--primary-color);
outline-offset: 2px;
}
}
@keyframes focus-in {
from {
outline: 0.5rem solid transparent;
outline-offset: 0.25rem;
}
}