1
0
Fork 0
app.sixfold.org/www/assets/css/core.css
2024-11-14 04:30:20 -05:00

907 lines
17 KiB
CSS

/* ====== START reset ======
Based on ["A (more) Modern CSS Reset"](https://piccalil.li/blog/a-more-modern-css-reset/) by Andy Bell
Used under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0/)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote {
margin: 0;
}
/* Remove list styles, but maintain semantics in VoiceOver */
ul[role='list'],
ol[role='list'] {
list-style: none;
}
body {
min-height: 100vh;
line-height: 1.4;
}
section,
main>header {
margin: 0 auto;
max-width: 60rem;
}
/* Avoid orphans in headings */
h1,
h2,
h3,
h4 {
text-wrap: balance;
}
a {
text-decoration-skip-ink: auto;
}
/* Make images easier to work with */
img,
picture {
max-width: 100%;
height: auto;
display: block;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font-family: inherit;
font-size: inherit;
}
/* Anything that has been anchored to should have extra scroll margin */
:target {
scroll-margin-block: 1ex;
}
/* ====== START good content ====== */
/* @link https://utopia.fyi/type/calculator?c=320,16,1.2,1440,20,1.25,6,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
:root {
/* Step -2: 11.1111px → 12.8px */
--step--2: clamp(0.6944rem, 0.6643rem + 0.1508vw, 0.8rem);
/* Step -1: 13.3333px → 16px */
--step--1: clamp(0.8333rem, 0.7857rem + 0.2381vw, 1rem);
/* Step 0: 16px → 20px */
--step-0: clamp(1rem, 0.9286rem + 0.3571vw, 1.25rem);
/* Step 1: 19.2px → 25px */
--step-1: clamp(1.2rem, 1.0964rem + 0.5179vw, 1.5625rem);
/* Step 2: 23.04px → 31.25px */
--step-2: clamp(1.44rem, 1.2934rem + 0.733vw, 1.9531rem);
/* Step 3: 27.648px → 39.0625px */
--step-3: clamp(1.728rem, 1.5242rem + 1.0192vw, 2.4414rem);
/* Step 4: 33.1776px → 48.8281px */
--step-4: clamp(2.0736rem, 1.7941rem + 1.3974vw, 3.0518rem);
/* Step 5: 39.8131px → 61.0352px */
--step-5: clamp(2.4883rem, 2.1094rem + 1.8948vw, 3.8147rem);
/* Step 6: 47.7757px → 76.2939px */
--step-6: clamp(2.986rem, 2.4767rem + 2.5463vw, 4.7684rem);
}
.flow>*+* {
margin-block-start: var(--flow-space, 1em);
}
blockquote {
padding-inline-start: 1em;
border-inline-start: 0.3em solid;
font-style: italic;
font-size: var(--step-1);
}
h1 {
font-size: var(--step-4);
}
h2 {
font-size: var(--step-3);
}
h3 {
font-size: var(--step-2);
}
:is(h1, h2, h3, blockquote) {
--flow-space: 1.5em;
}
:is(h1, h2, h3)+* {
--flow-space: 0.5em;
}
main>* {
max-width: 60rem;
margin-inline: auto;
}
a {
text-underline-offset: 0.3ex;
position: relative;
}
a:hover {
text-decoration-thickness: 0.3ex;
}
a:active {
text-decoration-thickness: 0.1ex;
}
/* ====== START project styles ====== */
:root {
--color-background: linen;
--color-foreground: black;
--color-accent: darkolivegreen;
--color-link: midnightblue;
--color-link-visited: rebeccapurple;
--color-link-active: darkred;
--color-mark: coral;
--color-mark: lightsalmon;
color-scheme: light;
accent-color: darkolivegreen;
--font-sans-serif: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
--font-serif: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
--font-mono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}
:focus {
outline: 0.125rem dashed var(--color-foreground);
outline-offset: 0.125em;
}
html {
box-sizing: inherit;
word-wrap: break-word;
-ms-hyphens: auto;
hyphens: auto;
}
body {
padding: 0 2rem;
background-color: var(--color-background);
color: var(--color-foreground);
font-family: var(--font-serif);
font-size: var(--step-0);
}
a {
color: var(--color-link);
}
a:visited {
color: var(--color-link-visited);
}
a:active {
color: var(--color-link-active);
}
[aria-current="page"] {
border-block-end-color: var(--color-accent);
}
mark {
padding: 0 0.125em;
background-color: var(--color-mark);
color: black;
}
body>header {
padding: 2rem 0;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
gap: 1.5rem;
}
body>header:nth-child(2) a:first-child {
width: 15rem;
height: auto;
}
body>header nav {
margin: auto 0;
font-size: 1.375rem;
}
body>header ul {
margin: 0;
padding: 0;
vertical-align: middle;
}
body>header li,
body>footer li {
display: inline;
vertical-align: middle;
}
body>header li+li::before {
content: "•";
font-size: 1em;
margin-left: 0.1875em;
margin-right: 0.1875em;
position: relative;
top: -0.0625em;
}
body>header a {
text-decoration: none;
color: currentColor !important;
border: 0.25em solid transparent;
}
body>header a:hover {
border-block-end-color: var(--color-accent);
;
}
hr {
margin: 1.5em auto;
width: 50%;
border-color: var(--color-foreground);
}
dt {
font-weight: 700;
}
aside.alert,
[data-game-status="0"] [data-status="0"],
[data-game-status="1"] [data-status="1"],
[data-game-status="2"] [data-status="2"],
[data-game-status="3"] [data-status="3"],
[data-game-status="7"] [data-status="7"],
[data-game-status="8"] [data-status="8"],
[data-game-status="9"] [data-status="9"] {
padding: 1em 2em;
border: 0.125em solid currentColor;
border-radius: 0.25em;
background-color: var(--color-mark, Mark);
color: MarkText;
}
a.call-to-action {
color: black !important;
background: gainsboro;
padding: 0.125em 0.375em;
display: inline-block;
font-variant: small-caps;
text-decoration: none;
border: 0.0625em solid currentColor;
font-size: 0.9em;
}
a.call-to-action:hover,
a.call-to-action:focus {
background: yellowgreen;
}
a.call-to-action::after {
content: " →";
}
.sr-only {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
overflow: hidden !important;
margin: -1px !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}
.social-media {
display: flex;
justify-content: center;
gap: 0.5rem;
}
.social-media a {
display: inline-block;
width: 1.75rem;
height: 1.75rem;
font-size: 0;
}
.social-media a {
color: inherit;
}
.social-media a:hover {
color: var(--color-accent);
}
.social-media a svg+span {
display: none
}
.social-media a:hover {
transform: scale(1.1);
}
.social-media a:active {
transform: scale(0.9);
}
svg {
fill: currentColor;
width: 100%;
}
nav[aria-labelledby="breadcrumb-heading"] ul {
margin: 0 0 0.5em 0;
padding: 0;
}
nav[aria-labelledby="breadcrumb-heading"] li {
display: inline-block;
}
nav[aria-labelledby="breadcrumb-heading"] li::after {
--breadcrumb-arrow-size: .4em;
display: inline-block;
margin: 0 0.125em;
content: "";
width: 0;
height: 0;
border-top: var(--breadcrumb-arrow-size) solid transparent;
border-bottom: var(--breadcrumb-arrow-size) solid transparent;
border-left: var(--breadcrumb-arrow-size) solid currentColor;
}
nav[aria-labelledby="breadcrumb-heading"] li:last-child::after {
content: unset;
}
nav[aria-labelledby="breadcrumb-heading"] a {
color: currentColor;
}
[aria-label="Skip links"] {
position: absolute;
inset-inline: 0;
inset-block-start: -100%;
padding: 0.5em;
background: Canvas;
box-shadow: 0 0 0.5em 0 CanvasText;
z-index: 10;
font-size: 0.9rem;
}
[aria-label="Skip links"]:focus-within {
inset-block-start: 0%;
}
[aria-label="Skip links"] ul {
margin: 0;
padding: 0;
}
[aria-label="Skip links"] li {
display: inline;
}
[aria-label="Skip links"] li+li {
margin-inline-start: 0.5em;
}
[aria-label="Skip links"] a {
color: CanvasText;
}
footer {
margin: 2rem auto 0 auto;
padding: 1rem 0;
max-width: 75rem;
border-block-start: 0.25rem double currentColor;
font-size: 0.9rem;
text-align: center;
clear: both;
}
footer ul {
padding: 0;
}
body>footer nav li+li::before {
content: "•";
font-size: 1em;
margin-left: 0.375em;
margin-right: 0.375em;
position: relative;
top: 0.0625em;
}
footer nav a {
color: inherit !important;
}
footer>p:last-child a {
margin: auto;
display: block;
width: 3rem;
font-size: 0;
color: inherit;
}
label {
display: block;
font-variant: small-caps;
}
input[type='radio']+label {
display: initial;
}
label>span {
margin-block-end: 0.125em;
display: block;
}
input[type="checkbox"]+span,
input[type="radio"]+span {
vertical-align: middle;
font-variant: normal;
display: inline;
}
label:has(select) span+span {
display: inline-block;
position: relative;
}
label:has(select) span+span::after {
display: block;
inset-block-start: 50%;
inset-inline-end: 0.75em;
transform: translateY(-50%);
font-style: normal;
position: absolute;
content: "▼";
font-size: 0.8rem;
line-height: 1;
z-index: 0;
color: inherit;
}
select {
padding: .125em 2em .125em .5em;
border: .0625em solid currentColor;
color: CanvasText;
background-color: Canvas;
--webkit-appearance: none;
appearance: none;
border-radius: 0.25em;
}
input[type='text'],
input[type='password'] {
width: 100%;
max-width: 30ch;
}
input,
textarea {
padding: .25em .5em;
border: 0.0625em solid currentColor;
color: var(--color-foreground);
border-radius: 0.25em;
}
textarea {
width: 100%;
resize: vertical;
min-height: 10ch;
border-radius: 0;
}
button {
padding: .375em .625em;
background-color: var(--color-accent, ButtonFace);
color: var(--color-background, ButtonText);
border-radius: 0 0.25em 0 0.25em;
border: 0.0625em solid var(--color-foreground, ButtonBorder);
font-variant: small-caps;
box-shadow: 0.1875em 0.1875em 0 0 var(--color-foreground, ButtonText);
}
button:focus {
box-shadow: none;
}
button:active {
position: relative;
inset-inline-start: 0.1875em;
inset-block-start: 0.1875em;
box-shadow: inset 0 0 0.375em black;
}
button:disabled {
background-color: black;
color: GrayText;
cursor: not-allowed;
text-decoration: line-through;
}
pre {
overflow: auto;
}
pre.code {
background-color: CanvasText;
color: Canvas;
padding: 0.375em 0.625em;
border-radius: 0.375em;
border: 0.0625em solid currentColor;
box-shadow: 0 0 0.375em 0.0625em inset currentColor;
}
code {
background-color: CanvasText;
color: Canvas;
padding: 0.0625em 0.375em;
border-radius: 0.375em;
border: 0.0625em solid currentColor;
white-space: normal;
word-break: break-all;
font-size: 0.9em;
}
code a {
color: currentColor !important;
text-decoration-color: currentColor;
}
/* === Tables === */
tbody a {
color: inherit;
}
/* Standard Tables */
table {
margin: 1em -0.125em;
border-collapse: collapse;
border: 0.1875em solid ButtonBorder;
min-width: 40em;
width: 100%;
color: CanvasText;
}
caption {
text-align: left;
font-style: italic;
padding: 0.5em;
}
th,
td {
padding: 0.25em 0.5em 0.25em 1em;
vertical-align: text-top;
text-align: left;
text-indent: -0.5em;
}
tr {
color: inherit;
border-block-start: 0.0625em solid GrayText;
}
tbody tr:last-child {
border-block-end: 0.0625em solid GrayText;
}
th+th,
th+td,
td+td {
border-inline-start: 0.0625em solid GrayText;
}
caption {
background-color: Canvas;
color: CanvasText;
}
th[scope="col"] {
vertical-align: bottom;
}
tbody tr:nth-child(even) {
background-color: rgba(255, 255, 255, 0.2);
}
tfoot tr,
tfoot th[scope="row"] {
background-color: CanvasText;
color: Canvas;
}
tfoot td {
border-color: Canvas;
}
/* Responsive Tables with Sticky Headers
Via Adrian Roselli
https://adrianroselli.com/2020/11/under-engineered-responsive-tables.html
https://adrianroselli.com/2020/01/fixed-table-headers.html
*/
[role="region"][aria-labelledby][tabindex] {
overflow: auto;
border: 0.1em solid GrayText;
}
[role="region"][aria-labelledby][tabindex]:focus {
box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.5);
outline: 0.1em solid rgba(0, 0, 0, 0.1);
}
[role="region"][aria-labelledby][tabindex] table {
margin: 0;
border: none;
}
/* Scrolling Visual Cue */
[role="region"][aria-labelledby][tabindex] {
background: linear-gradient(to right, Canvas 30%, rgba(255, 255, 255, 0)), linear-gradient(to right, rgba(255, 255, 255, 0), Canvas 70%) 0 100%, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)) 0 100%;
background-repeat: no-repeat;
background-color: Canvas;
background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
background-position: 0 0, 100%, 0 0, 100%;
background-attachment: local, local, scroll, scroll;
}
/* Fixed Headers */
th {
position: sticky;
inset-block-start: 0;
z-index: 2;
background-color: Canvas;
color: CanvasText;
}
th[scope="row"] {
position: sticky;
inset-inline-start: 0;
z-index: 1;
vertical-align: top;
}
th[scope="row"]::after {
content: "";
position: absolute;
inset-inline-end: -0.0625em;
inset-block: 0;
border-inline-end: 0.0625em solid GrayText;
}
th[scope="col"]:first-child::after {
content: "";
position: absolute;
inset-inline-end: -0.0625em;
inset-block: 0;
border-inline-end: 0.0625em solid GrayText;
}
th:not([scope="row"]):first-child {
/* left: 0; */
inset-inline-start: 0;
z-index: 3;
}
/* ====== page-specific styles ====== */
.highlight {
display: flex;
flex-wrap: wrap;
gap: 1.5em;
max-width: unset;
background-color: var(--color-mark);
color: black;
position: relative;
margin-inline-start: -2rem;
padding: 3rem;
width: calc(100% + 4rem);
box-shadow: 0 0 0.5em 0.125em currentColor inset;
}
.highlight a {
color: inherit;
}
.highlight>div {
flex: 1 1 15rem;
}
.highlight>div:first-child p {
font-size: var(--step-2);
max-width: 40ch;
}
#recent-issues {
flex-basis: 15rem;
text-align: center;
}
#recent-issues>*+* {
margin-block-start: 1em;
}
#recent-issues>div:first-of-type {
position: relative;
}
#recent-issues>div picture {
display: inline-block;
position: relative;
}
#recent-issues>div picture:first-child {
transform: rotate(-6deg) translateX(-50%);
z-index: 20;
position: absolute;
inset-inline-start: 42%;
inset-block-end: 1em;
}
#recent-issues>div picture:nth-child(2) {
z-index: 10;
inset-block-end: 0.25em;
transform: rotate(3deg);
}
#recent-issues>div picture:nth-child(3) {
position: absolute;
inset-inline-start: 50%;
transform: rotate(9deg);
}
#recent-issues>p:first-of-type {
margin-block-start: 0.5em;
}
[aria-labelledby="swatches-caption"] td {
width: 5rem;
height: 5rem;
background-color: currentColor;
font-size: 0;
}
#masthead ul span {
font-weight: bold;
}
.patrons {
padding: 0;
list-style: none;
columns: 3;
font-style: italic;
}
.cover {
border: 0.0625em solid GrayText;
border-radius: 0.1875em;
box-shadow: 0 0 1em -0.5em CanvasText;
background-color: var(--color-background);
transition: transform 0.375s;
}
a .cover:hover {
transform: scale(1.03);
}
a .cover:active {
transform: scale(1);
}
#issues ol {
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 2em;
}
#issues li {
text-align: center;
}
#issues li>a {
display: inline-block;
width: 100%;
}
#issues p a {
text-decoration: none;
font-weight: 700;
color: inherit;
}
@supports (display: grid) {
#issues ol {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
gap: 2em;
}
}
#issues li.legacy-issue>a {
padding-block-start: 3em;
}
#issues .legacy-issue picture:first-child {
width: 60%;
position: relative;
inset-block-start: -3em;
}
#issues .legacy-issue picture:nth-child(2) {
position: absolute;
width: 60%;
inset-block-end: 0;
inset-inline-end: 0;
}
.issue>header~div,
.issue-legacy>header~div>div {
display: flex;
flex-wrap: wrap;
gap: 1.25em;
}
.issue-legacy>header~div>div {
gap: 1em;
justify-content: space-between;
}
.issue>header~div>div h2 {
flex-basis: 100%;
}
#toc dd {
font-style: italic;
}
.step-by-step-guide #toc~section {
counter-increment: item;
}
.step-by-step-guide #toc~section h2::before {
content: counter(item) ".";
margin-inline-end: 0.25em;
font-size: 0.625em;
}