@import "normalise"; @import "highlight"; $md: 32em; $lg: 48em; $page-width: 64rem; /* * Base styling */ html { color-scheme: light dark; overflow-y: scroll; // Avoid content jumping } html, body { height: 100%; } body { background-color: var(--bg0); color: var(--fg0); line-height: 1.5; } // Links a, .a { color: var(--a); cursor: pointer; text-decoration: none; } :not(main):target { background-color: var(--bg2); padding: 0.2rem 0.3rem; border-radius: 0.5rem; } // Headers h1 { font-size: 2rem; } h2 { font-size: 1.75rem; } h3 { font-size: 1.55rem; } h4 { font-size: 1.35rem; } h5 { font-size: 1.25rem; } h6 { font-size: 1.15rem; } h1, h2, h3, h4, h5, h6 { margin: 1.2rem 0 0.55rem 0; font-weight: 500; line-height: 1.1; } h1 .fragment, h2 .fragment, h3 .fragment, h4 .fragment, h5 .fragment, h6 .fragment { color: inherit; } // Tables table { table-layout: fixed; border-collapse: collapse; border-spacing: 0; margin: 1rem 0; } th, td { padding: 0.25rem 0.5rem 0.25rem 0.5rem; } table, th, td { border: 0.1rem solid var(--bg4); } th { background: var(--bg2); } // Lists ul, ol { margin: 0 0 1rem 0; padding-left: 1rem; } ul ul, ol ol { padding-left: 2rem; } li p { margin: 0; } // Code blocks pre, code { background-color: var(--bg1); border: 1px solid var(--bg2); } pre code { border: none; } pre { background-color: var(--bg1); padding: 0.5rem 0.65rem; border-radius: 0.5rem; overflow: auto; max-height: 30rem; tab-size: 4; } // Blockquote blockquote { margin-left: 0; padding-left: 1rem; border-left: 0.5rem solid var(--bg3); } // Other hr { margin: 1rem 0; } p { margin: 0 0 1rem 0; } /* * Layout */ .skip-to-content { background-color: var(--bg2); text-align: center; position: absolute; width: 100%; top: -100%; z-index: 1000; &:focus { top: 0; } } #container { display: grid; grid-gap: 0 2rem; grid-template-columns: minmax(1px, 1fr); padding: 0.5rem 1.5rem 1.5rem 1.5rem; margin: 0 auto 0 auto; max-width: $page-width; } @media (min-width: $lg) { #container { grid-template-columns: minmax(1px, 1fr) max-content; } .aside { grid-column: 2/3; } } #main { h1:first-of-type { margin-top: 0rem; } } .home-header { display: flex; gap: 1rem; margin-bottom: 1rem; &__text { margin: 0; } } /* * Navbar */ .navbar { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: $page-width; padding: 1rem 1.5rem 0.75rem 1.5rem; margin: 0 auto; @media (min-width: $lg) { flex-wrap: nowrap; justify-content: start; } &__links { display: none; flex-direction: column; @media (min-width: $lg) { display: flex; flex-direction: row; } } &__link { color: var(--fg0); white-space: nowrap; text-align: right; margin: 0.3rem 0; @media (min-width: $lg) { margin: 0 0.5rem; } &--title { font-weight: bold; margin-left: 0; } } &__divider { width: 0.1rem; background-color: var(--bg4); } &__menu-btn { display: block; user-select: none; @media (min-width: $lg) { display: none; } } } #navbar__menu { display: flex; flex-direction: column; justify-content: space-between; width: 100%; @media (min-width: $lg) { flex-direction: row; } } #hamburger:checked ~ #navbar__menu .navbar__links { display: flex; } #hamburger:checked ~ #navbar__menu { background-color: var(--bg1); box-shadow: 0 0 1rem rgba(0,0,0,0.15); border: 0.125rem solid var(--bg2); padding: 0.1rem 0.5rem; border-radius: 0.25rem; @media (min-width: $lg) { background-color: unset; box-shadow: unset; border: unset; padding: unset; border-radius: unset; } } .dropdown { cursor: pointer; position: relative; user-select: none; summary { list-style: none; &::-webkit-details-marker { display: none; } &::after { display: inline-block; margin-left: 0.25rem; vertical-align: 0.2rem; content: ""; border-top: 0.3rem solid; border-right: 0.3rem solid transparent; border-bottom: 0; border-left: 0.3rem solid transparent; } } &__popup { @extend .popup; display: flex; flex-direction: column; right: 0; margin-top: 0.5rem; border-radius: 0.25rem; @media (min-width: $lg) { position: absolute; } } &__item { color: var(--fg0); padding: 0.25rem 1.25rem; text-decoration: none; &:not(:last-child) { border-bottom: 0.15rem solid var(--bg4); } } } /* * Aside */ .aside { display: flex; flex-direction: column; justify-content: center; width: 100%; margin: 4rem auto 0 auto; align-items: center; @media (min-width: $md) { flex-direction: row; } @media (min-width: $lg) { margin-top: 0rem; flex-direction: column; justify-content: flex-start; } &__links { display: flex; flex-direction: column; margin-top: 1rem; @media (min-width: $md) { margin-left: 2rem; } @media (min-width: $lg) { margin-left: 0rem; } } &__link { display: block; margin-bottom: 0.75rem; } &__avatar { width: 6rem; height: 6rem; border-radius: 0.5rem; @media (min-width: $md) { width: 8rem; height: 8rem; } @media (min-width: $lg) { margin: 0 auto; } } } /* * Buttons */ .btn { display: inline-flex; justify-content: center; align-items: center; white-space: nowrap; gap: 0.5rem; color: #fff; border-radius: 0.25rem; padding: 0.25rem 1rem; transition-duration: 150ms; &__img { height: 100%; padding: 0.2rem 0; } &--grey { color: var(--fg0); background-color: var(--bg2); &:hover { background-color: var(--bg3); } } &--feed { font-size: 0.5em; } } /* * Article */ .article { &__date { color: var(--fg1); margin-top: -0.5rem; margin-bottom: 1rem; } } .article img { max-width: 100%; } .post { font-size: 1.125rem; margin: 1rem 0; @media (min-width: $md) { margin: 0.75rem 0; } &__date { color: var(--fg1); @media (min-width: $md) { display: inline-block; } } } /* * Other */ #clipboard { @extend .popup; position: fixed; bottom: 0; right: 0; margin: 1.5rem; padding: 0.75rem; opacity: 0; visibility: hidden; transition-duration: 700ms; } .flag { white-space: nowrap; &__img { max-width: unset; height: 1.1rem; display: inline-block; vertical-align: middle; margin-bottom: 0.15rem; } } .popup { background-color: var(--bg3); border: 0.15rem solid var(--bg4); box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15); border-radius: 0.25rem; } .d-none { display: none; } .nocss-helper { display: none; }