Created
July 5, 2020 18:36
-
-
Save TCotton/767f432a996a5abd44a0bca7d595e839 to your computer and use it in GitHub Desktop.
heydon best practice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: Barlow Condensed; | |
src: url(/css/lib/fonts/barlowcondensed-bold.woff2) format("woff2"), url(/css/lib/fonts/barlowcondensed-bold.woff) format("woff"); | |
font-weight: 700; | |
font-style: normal; | |
} | |
:root { | |
--font-plain: Helvetica Neue, Helvetica, Arial, sans-serif; | |
--font-special: Barlow Condensed, Helvetica, sans-serif; | |
--font-mono: Menlo, Courier, Courier New, Andale Mono, monospace; | |
--color-dark: #050505; | |
--color-darkish: #404040; | |
--color-lightish: #e6e6e6; | |
--color-light: #fafafa; | |
--color-mid: grey; | |
--ratio: 1.4; | |
--s-5: calc(var(--s0) / var(--ratio) / var(--ratio) / var(--ratio) / var(--ratio) / var(--ratio)); | |
--s-4: calc(var(--s0) / var(--ratio) / var(--ratio) / var(--ratio) / var(--ratio)); | |
--s-3: calc(var(--s0) / var(--ratio) / var(--ratio) / var(--ratio)); | |
--s-2: calc(var(--s0) / var(--ratio) / var(--ratio)); | |
--s-1: calc(var(--s0) / var(--ratio)); | |
--s0: 1rem; | |
--s1: calc(var(--s0) * var(--ratio)); | |
--s2: calc(var(--s0) * var(--ratio) * var(--ratio)); | |
--s3: calc(var(--s0) * var(--ratio) * var(--ratio) * var(--ratio)); | |
--s4: calc(var(--s0) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio)); | |
--s5: calc(var(--s0) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio)); | |
--measure: 65ch; | |
--line-height: var(--ratio); | |
--line-height-small: calc(0.8 * var(--ratio)); | |
--border-thin: var(--s-5); | |
--border-thick: var(--s-2); | |
line-height: var(--ratio); | |
font-size: calc(0.333vw + 1em); | |
font-family: var(--font-plain); | |
background-color: var(--color-light); | |
color: var(--color-dark); | |
} | |
*, | |
:after, | |
:before { | |
box-sizing: border-box; | |
background-color: inherit; | |
font-family: inherit; | |
color: inherit; | |
overflow-wrap: break-word; | |
margin: 0; | |
padding: 0; | |
border: 0 solid; | |
} | |
[hidden] { | |
display: none; | |
} | |
[hidden] + * { | |
margin-top: 0 !important; | |
} | |
footer, | |
header, | |
main, | |
nav { | |
display: block; | |
} | |
@media (prefers-reduced-motion: no-preference) { | |
:root { | |
scroll-behavior: smooth; | |
} | |
} | |
:focus { | |
outline: var(--border-thin) solid var(--color-mid); | |
outline-offset: var(--border-thin); | |
} | |
[tabindex="-1"]:focus { | |
outline: none; | |
} | |
.cta, | |
button { | |
font-size: inherit; | |
font-weight: 700; | |
display: inline-block; | |
cursor: pointer; | |
font-family: var(--font-special); | |
color: var(--color-light); | |
background-color: var(--color-dark); | |
padding: var(--s-1) var(--s2); | |
border-width: var(--border-thin); | |
} | |
.cta { | |
background-color: transparent; | |
color: var(--color-dark); | |
} | |
.cta--big { | |
display: block; | |
font-size: var(--s2); | |
text-align: center; | |
text-decoration: none; | |
} | |
.cta--big span { | |
text-decoration: underline; | |
} | |
[href="#main"] { | |
display: inline-block; | |
padding: var(--s-1); | |
color: var(--color-light); | |
background-color: var(--color-dark); | |
position: absolute; | |
top: -10rem; | |
} | |
[href="#main"]:focus { | |
position: absolute; | |
z-index: 1; | |
top: 0; | |
outline: none; | |
} | |
.docs-block-link { | |
display: block; | |
} | |
img { | |
width: 100%; | |
} | |
[role="figure"], | |
figure { | |
text-align: center; | |
} | |
[role="figure"] img, | |
figure img { | |
background-image: linear-gradient(var(--color-light), var(--color-light)); | |
} | |
.figcaption, | |
figcaption { | |
margin-top: var(--s-1); | |
font-size: var(--s-1); | |
} | |
.docs-icon { | |
width: 0.75em; | |
height: 0.75em; | |
stroke: currentColor; | |
stroke-width: 4; | |
fill: none; | |
text-decoration-skip: objects; | |
} | |
noscript { | |
padding: var(--s-1); | |
background-color: var(--color-lightish); | |
} | |
kbd { | |
line-height: 1; | |
font-size: var(--s-1); | |
color: var(--color-light); | |
background-color: var(--color-dark); | |
padding: 0.125em 0.5em; | |
border-radius: 0.125em; | |
} | |
table { | |
width: 100%; | |
border-collapse: collapse; | |
} | |
table code { | |
white-space: nowrap; | |
} | |
td, | |
th { | |
border-width: var(--border-thin); | |
padding: var(--s-1); | |
text-align: left; | |
} | |
td:first-child { | |
font-weight: 700; | |
} | |
.docs-props-table { | |
overflow-x: auto; | |
} | |
.docs-props-table td:last-child { | |
font-size: var(--s-1); | |
} | |
h1, | |
h2, | |
h3, | |
h4 { | |
line-height: var(--line-height-small); | |
font-family: var(--font-special); | |
font-weight: 700; | |
hyphens: auto; | |
} | |
.h1, | |
h1 { | |
font-size: var(--s4); | |
} | |
.h2, | |
h2 { | |
font-size: var(--s3); | |
} | |
.h3, | |
h3 { | |
font-size: var(--s2); | |
} | |
.h4, | |
h4 { | |
font-size: var(--s1); | |
} | |
aside > ol, | |
aside > ul, | |
main > ol, | |
main > ul { | |
padding-left: 2em; | |
} | |
main > * + * { | |
margin-top: var(--s3); | |
} | |
[class^="docs-note"] p + p, | |
main p + p { | |
margin-top: var(--s-1); | |
} | |
hr { | |
padding: var(--border-thin) 0 0; | |
border-left-width: 0; | |
border-bottom-width: var(--border-thin); | |
border-right-width: 0; | |
border-top-width: var(--border-thin); | |
} | |
button, | |
pre { | |
outline: var(--border-thin) solid transparent; | |
outline-offset: calc(var(--border-thin) * -1); | |
} | |
.docs-quote > span { | |
font-size: 2.5rem; | |
font-family: var(--font-special); | |
font-weight: 700; | |
background-color: var(--color-dark); | |
color: var(--color-light); | |
box-decoration-break: clone; | |
-webkit-box-decoration-break: clone; | |
padding: 0.5rem 1ch; | |
line-height: var(--line-height); | |
} | |
.docs-logo svg { | |
width: 100%; | |
} | |
.docs-nav-toggle { | |
font-size: var(--s1); | |
margin-top: var(--s1); | |
font-weight: 700; | |
width: 100%; | |
text-align: center; | |
display: none; | |
} | |
.docs-nav-toggle path { | |
transition: d 0.25s; | |
} | |
.docs-nav-toggle[aria-expanded="true"] path { | |
d: path("M3,3 29,29 M16,16 16,16 M3,29 29,3"); | |
} | |
@media (max-width: 827px) { | |
.with-js .docs-nav-toggle { | |
display: block; | |
} | |
.with-js .docs-nav { | |
display: none; | |
} | |
[aria-expanded="true"] + .docs-nav { | |
display: block; | |
} | |
} | |
.docs-nav { | |
text-align: center; | |
margin-top: var(--s0); | |
} | |
.docs-nav ul { | |
list-style: none; | |
} | |
.docs-nav li + li { | |
margin-top: var(--s-2); | |
} | |
.docs-nav h2 { | |
font-size: var(--s2); | |
text-transform: uppercase; | |
line-height: var(--line-height); | |
} | |
.docs-nav * + h2 { | |
margin-top: var(--s2); | |
} | |
.docs-nav * + * { | |
margin-top: var(--s-3); | |
} | |
.docs-index-link { | |
display: block; | |
font-size: var(--s-1); | |
} | |
.docs-index-link .docs-icon { | |
width: 1.25em; | |
height: 1.25em; | |
vertical-align: -0.25em; | |
} | |
.docs-nav a { | |
display: inline-block; | |
line-height: var(--line-height-small); | |
font-weight: 700; | |
text-decoration: none; | |
} | |
.docs-nav a:not([aria-current="true"]):hover { | |
text-decoration: underline; | |
} | |
.docs-nav [aria-current="true"] { | |
position: relative; | |
text-indent: -1em; | |
} | |
.docs-feed-link { | |
font-size: var(--s1); | |
font-family: var(--font-special); | |
margin-top: var(--s-1); | |
} | |
.docs-toc { | |
position: relative; | |
border-width: var(--s-3); | |
font-weight: 700; | |
} | |
.docs-toc > [aria-hidden] { | |
position: absolute; | |
right: 1rem; | |
top: -0.75em; | |
text-transform: uppercase; | |
font-family: var(--font-special); | |
padding: 0 0.5rem; | |
font-size: var(--s1); | |
line-height: var(--line-height-small); | |
} | |
.docs-toc ul { | |
padding: var(--s1) var(--s3); | |
margin: 0; | |
} | |
.docs-toc li { | |
line-height: var(--line-height-small); | |
} | |
.docs-toc li + li { | |
margin-top: var(--s-2); | |
} | |
.docs-toc a { | |
text-decoration: none; | |
} | |
.docs-section-header { | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: flex-start; | |
} | |
.docs-section-header a { | |
font-size: 2.25rem; | |
} | |
.docs-section-header > :first-child { | |
margin-right: var(--s-2); | |
} | |
.docs-page { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
.docs-header, | |
.docs-main { | |
padding: var(--s2); | |
} | |
.docs-header { | |
flex-basis: 15rem; | |
flex-grow: 1; | |
position: relative; | |
outline: var(--border-thin) dashed; | |
padding-top: var(--s3); | |
} | |
.docs-main { | |
flex-basis: 0; | |
flex-grow: 999; | |
min-width: 66%; | |
display: flex; | |
flex-direction: column; | |
padding-bottom: 0; | |
} | |
.docs-main > :last-child { | |
margin-top: 0; | |
} | |
footer, | |
main > * { | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
max-width: 35rem; | |
} | |
main > style, | |
script { | |
display: none; | |
} | |
footer:before { | |
content: "\220e"; | |
display: block; | |
padding-bottom: var(--s-1); | |
} | |
[class^="docs-note"] { | |
border-left-width: var(--s0); | |
padding-left: var(--s0); | |
} | |
[class^="docs-note"] > * + * { | |
margin-top: var(--s3); | |
} | |
.docs-note--warning { | |
border-image: repeating-linear-gradient(-25deg, transparent, transparent 0.333rem, var(--color-dark) 0, var(--color-dark) 0.666rem) 25; | |
} | |
.docs-launcher { | |
text-align: center; | |
margin-top: 0; | |
} | |
.docs-launcher:before { | |
content: ""; | |
width: 0; | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
border-left-width: var(--border-thin); | |
height: var(--s2); | |
} | |
.docs-demo-page { | |
padding: var(--s1); | |
min-height: 100vh; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
} | |
.docs-demo-page > h1 { | |
text-align: center; | |
font-size: var(--s3); | |
} | |
.docs-demo-page > h1 + * { | |
margin-top: var(--s2); | |
} | |
.docs-demo-inline { | |
max-width: none; | |
} | |
label { | |
font-weight: 700; | |
} | |
label, | |
label small { | |
display: block; | |
} | |
label small { | |
font-weight: 400; | |
font-style: italic; | |
} | |
.card-container, | |
[type="checkbox"] ~ svg, | |
input, | |
textarea { | |
box-shadow: inset 0.25rem 0.25rem 0 #ddd; | |
} | |
.card-container, | |
[type="email"], | |
[type="text"], | |
textarea { | |
width: 100%; | |
font-size: inherit; | |
border-width: var(--border-thin); | |
padding: var(--s-1); | |
} | |
[type="checkbox"] ~ svg { | |
stroke: transparent; | |
border-width: var(--border-thin); | |
vertical-align: middle; | |
padding: 2px; | |
box-sizing: content-box; | |
} | |
[type="checkbox"]:checked ~ svg { | |
stroke: currentColor; | |
} | |
[type="checkbox"]:focus ~ svg { | |
outline: var(--border-thin) solid var(--color-mid); | |
} | |
input:focus, | |
textarea:focus { | |
outline-offset: 0; | |
} | |
.docs-field label + * { | |
margin-top: var(--s-3); | |
} | |
form > * + * { | |
margin-top: var(--s1); | |
} | |
.docs-generator { | |
display: flex; | |
flex-wrap: wrap; | |
border-width: var(--border-thin); | |
} | |
.docs-generator[hidden] { | |
display: none; | |
} | |
.docs-generator > * { | |
flex: 1 0 auto; | |
flex-basis: 15rem; | |
} | |
.docs-generator form { | |
padding: var(--s1); | |
} | |
.docs-generator output { | |
background-color: var(--color-dark); | |
overflow-x: auto; | |
} | |
.docs-generator pre { | |
overflow: hidden; | |
} | |
.docs-hl { | |
background-color: var(--color-darkish); | |
padding: var(--s-5) var(--s-4); | |
} | |
.docs-generator__switcher { | |
font-family: var(--font-mono); | |
color: var(--color-light); | |
display: flex; | |
text-align: center; | |
} | |
.docs-generator__switcher > * { | |
flex-basis: 50%; | |
} | |
.docs-generator__switcher label > span { | |
padding: var(--s-3); | |
display: block; | |
background-color: var(--color-light); | |
color: var(--color-dark); | |
} | |
.docs-generator__switcher input:checked + span { | |
filter: invert(100%); | |
} | |
.docs-generator__switcher input:focus + span { | |
outline: var(--border-thin) solid var(--color-mid); | |
outline-offset: calc(var(--border-thin) * -1); | |
} | |
@keyframes pinch { | |
0% { | |
transform: translateY(0.5rem); | |
} | |
25% { | |
transform: translateY(-0.5rem); | |
} | |
50% { | |
transform: translateY(0.25rem); | |
} | |
75% { | |
transform: translateY(-0.25rem); | |
} | |
87.5% { | |
transform: rotate(0.125rem); | |
} | |
to { | |
transform: rotate(0); | |
} | |
} | |
.docs-output--regenerated code { | |
animation: pinch 0.25s ease-in; | |
} | |
h1 + .docs-blog-meta { | |
font-weight: 700; | |
margin-top: var(--s-3); | |
} | |
.docs-blog-meta > span { | |
white-space: nowrap; | |
margin-right: var(--s-3); | |
} | |
.docs-features { | |
list-style: none; | |
padding: 0; | |
text-align: center; | |
} | |
.docs-features img { | |
height: 7.5rem; | |
width: auto; | |
max-width: 100%; | |
} | |
.docs-picture-index [role="listitem"] { | |
position: relative; | |
} | |
.docs-picture-index a { | |
text-decoration: none; | |
} | |
.docs-picture-index a h2 { | |
text-decoration: underline; | |
} | |
.docs-picture-index img { | |
max-width: 12rem; | |
} | |
.docs-read-now { | |
box-shadow: 0 0 0 var(--border-thin) var(--color-light); | |
top: 0; | |
right: 0; | |
transform: rotate(20deg); | |
background-color: var(--color-dark); | |
color: var(--color-light); | |
padding: var(--s-5) var(--s-2); | |
line-height: var(--line-height-small); | |
} | |
.docs-read-now, | |
.loader { | |
font-weight: 700; | |
position: absolute; | |
} | |
.loader { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
width: 100%; | |
height: 100%; | |
padding: var(--s5) var(--s0); | |
background: hsla(0, 0%, 98%, 0.95); | |
z-index: 1; | |
} | |
.checkout-form { | |
position: relative; | |
} | |
code { | |
font-family: var(--font-mono); | |
font-size: 0.85em; | |
} | |
pre code { | |
background-color: var(--color-dark); | |
display: block; | |
padding: var(--s1); | |
} | |
pre[class*="language-"], | |
pre code { | |
color: var(--color-light); | |
overflow-x: auto; | |
} | |
pre[class*="language-"] { | |
text-align: left; | |
white-space: pre; | |
word-spacing: normal; | |
word-break: normal; | |
word-wrap: normal; | |
line-height: 1.4; | |
-moz-tab-size: 2; | |
-o-tab-size: 2; | |
tab-size: 2; | |
-webkit-hyphens: none; | |
-moz-hyphens: none; | |
-ms-hyphens: none; | |
hyphens: none; | |
} | |
.token.cdata, | |
.token.comment, | |
.token.doctype, | |
.token.prolog { | |
color: #cecece; | |
} | |
.token.punctuation { | |
color: #fefefe; | |
} | |
.token.constant, | |
.token.deleted, | |
.token.property, | |
.token.symbol, | |
.token.tag { | |
color: #b1b1b1; | |
} | |
.token.attr-name, | |
.token.builtin, | |
.token.char, | |
.token.inserted, | |
.token.selector, | |
.token.string { | |
color: #cbcbcb; | |
} | |
.language-css .token.string, | |
.style .token.string, | |
.token.entity, | |
.token.operator, | |
.token.url, | |
.token.variable { | |
color: #b8b8b8; | |
} | |
.token.atrule, | |
.token.attr-value, | |
.token.function { | |
color: #d2d2d2; | |
} | |
.token.keyword { | |
color: #b8b8b8; | |
} | |
.token.color, | |
.token.important, | |
.token.regex { | |
color: #d2d2d2; | |
} | |
.token.bold, | |
.token.important { | |
font-weight: 700; | |
} | |
.token.italic { | |
font-style: italic; | |
} | |
.token.entity { | |
cursor: help; | |
} | |
image-l { | |
display: block; | |
} | |
image-l:after { | |
content: ""; | |
display: block; | |
border: var(--border-thin) solid var(--color-dark); | |
background-image: paint(image-cross); | |
} | |
text-l { | |
display: block; | |
} | |
text-l span { | |
display: inline-block; | |
color: transparent; | |
position: relative; | |
pointer-events: none; | |
} | |
text-l span:before { | |
content: ""; | |
position: absolute; | |
left: 0; | |
right: 0; | |
top: calc(50% - var(--border-thin) / 2); | |
bottom: calc(50% - var(--border-thin) / 2); | |
background-color: var(--color-dark); | |
} | |
words-l { | |
font-family: var(--font-plain); | |
} | |
shrink-grow { | |
display: block; | |
margin-left: 0; | |
margin-right: 0; | |
max-width: none; | |
overflow: hidden; | |
border-width: var(--border-thin); | |
padding: var(--s1); | |
} | |
shrink-grow .test { | |
display: inline-block; | |
} | |
switcher-l { | |
display: block; | |
} | |
switcher-l > * { | |
display: flex; | |
flex-wrap: wrap; | |
overflow: hidden; | |
} | |
switcher-l > * > * { | |
flex-basis: calc((var(--measure) - 100%) * 999); | |
flex-grow: 1; | |
} | |
center-l { | |
display: block; | |
box-sizing: content-box; | |
margin-left: auto; | |
margin-right: auto; | |
max-width: var(--measure); | |
} | |
cover-l { | |
min-height: 100vh; | |
padding: var(--s1); | |
} | |
cover-l, | |
stack-l { | |
display: flex; | |
flex-direction: column; | |
} | |
stack-l { | |
justify-content: flex-start; | |
} | |
stack-l > * + * { | |
margin-top: var(--s1); | |
} | |
box-l { | |
display: block; | |
padding: var(--s1); | |
border-width: var(--border-thin); | |
outline: var(--border-thin) solid transparent; | |
outline-offset: calc(var(--border-thin) * -1); | |
} | |
grid-l { | |
display: grid; | |
grid-gap: var(--s1); | |
align-content: start; | |
grid-template-columns: 100%; | |
} | |
sidebar-l > * { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
sidebar-l > * > * { | |
flex-grow: 1; | |
} | |
cluster-l > * { | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: flex-start; | |
align-items: flex-start; | |
margin: calc(var(--s1) / 2 * -1); | |
} | |
cluster-l > * > * { | |
margin: calc(var(--s1) / 2); | |
} | |
frame-l { | |
display: block; | |
position: relative; | |
padding-bottom: 66.66667%; | |
} | |
frame-l > * { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
} | |
frame-l > img, | |
frame-l > video { | |
height: 100%; | |
width: 100%; | |
object-fit: cover; | |
} | |
reel-l { | |
display: flex; | |
overflow-x: auto; | |
overflow-y: hidden; | |
scrollbar-color: var(--color-light) var(--color-dark); | |
} | |
reel-l > * { | |
flex: 0 0 var(--item-width); | |
} | |
reel-l > img { | |
height: 100%; | |
flex-basis: auto; | |
width: auto; | |
} | |
reel-l::-webkit-scrollbar { | |
height: 1rem; | |
} | |
reel-l::-webkit-scrollbar-thumb, | |
reel-l::-webkit-scrollbar-track { | |
background-color: var(--color-dark); | |
} | |
reel-l::-webkit-scrollbar-thumb { | |
background-image: linear-gradient(var(--color-dark), var(--color-dark) 0.25rem, var(--color-light) 0, var(--color-light) 0.75rem, var(--color-dark) 0); | |
} | |
imposter-l { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} | |
icon-l svg { | |
height: 0.75em; | |
height: 1cap; | |
width: 0.75em; | |
width: 1cap; | |
} | |
.vh { | |
clip-path: inset(100%) !important; | |
clip: rect(1px, 1px, 1px, 1px) !important; | |
height: 1px !important; | |
overflow: hidden !important; | |
position: absolute !important; | |
white-space: nowrap !important; | |
width: 1px !important; | |
} | |
.display\:block { | |
display: block !important; | |
} | |
.filter\:invert { | |
filter: invert(100%) !important; | |
} | |
.text-align\:center { | |
text-align: center !important; | |
} | |
.text-align\:left { | |
text-align: left !important; | |
} | |
.font-size\:body { | |
font-size: 1rem !important; | |
} | |
.font-size\:small { | |
font-size: 0.75rem !important; | |
} | |
.font-size\:1 { | |
font-size: var(--s1) !important; | |
} | |
.max-width\:quarter { | |
max-width: calc(var(--measure) / 4) !important; | |
} | |
.height\:100\% { | |
height: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment