Cleanup SCSS
This commit is contained in:
parent
0a6c50810b
commit
939a98b53a
371
src/scss/components/_superminimal.scss
Normal file
371
src/scss/components/_superminimal.scss
Normal file
|
|
@ -0,0 +1,371 @@
|
|||
/* ------------------------------------ *\
|
||||
https://codepen.io/mikemai2awesome/full/KKvMZVz
|
||||
\* ------------------------------------ */
|
||||
|
||||
:root {
|
||||
color: var(--text);
|
||||
background-color: var(--background);
|
||||
accent-color: var(--text);
|
||||
}
|
||||
|
||||
:where(a) {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
:where(input, textarea, select) {
|
||||
color: var(--text);
|
||||
background-color: var(--background);
|
||||
}
|
||||
|
||||
:where(button, .btn) {
|
||||
color: var(--primary-light);
|
||||
background-color: var(--text);
|
||||
}
|
||||
|
||||
:where(code) {
|
||||
color: var(--text);
|
||||
background-color: var(--primary-dark);
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
Typography
|
||||
\* ------------------------------------ */
|
||||
|
||||
:root {
|
||||
font-size: clamp(
|
||||
var(--font-size),
|
||||
var(--font-size) * 0.9 + 0.25vw,
|
||||
var(--font-size) * 2
|
||||
); // % ensures browser zoom is supported.
|
||||
font-family: var(--font); // Use system UI font.
|
||||
font-weight: var(--font-weight-regular);
|
||||
line-height: var(--leading); // Standard leading for good legibility.
|
||||
letter-spacing: var(--tracking);
|
||||
}
|
||||
|
||||
:where(a) {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: var(--border-width);
|
||||
text-underline-offset: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(a):hover {
|
||||
text-decoration-thickness: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(pre, code, kbd, dl, figcaption, abbr, table) {
|
||||
font-family: var(--font-code); // Differentiate preformatted, code, description, and table text from body text.
|
||||
font-size: 0.8em; // Make monospace and small text smaller than body text.
|
||||
}
|
||||
|
||||
:where(pre code) {
|
||||
display: block; // Define block code.
|
||||
font-size: 1em; // Prevent cascading.
|
||||
}
|
||||
|
||||
:where(blockquote, em, i, cite) {
|
||||
font-family: var(--font-italic); // Differentiate blockquote, citation, idiomatic, and emphasisized text from body text. Also, sans-serif italic is ugly.
|
||||
font-weight: var(--font-weight-regular); // Prevent italics to be bold. Bold italic is also ugly and unnecessary.
|
||||
}
|
||||
|
||||
:where(blockquote) {
|
||||
font-size: clamp(1.5rem, 1.25rem + 1vw, 3rem);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
:where(blockquote p) {
|
||||
max-inline-size: 35ch;
|
||||
}
|
||||
|
||||
:where(blockquote q):before {
|
||||
position: absolute;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
:where(strong, b, th, button, .btn) {
|
||||
font-weight: var(--font-weight-semibold); // Make non-heading emphasized text less bold than heading text.
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, summary strong, legend) {
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, summary strong, legend) {
|
||||
font-stretch: var(--font-stretch, expanded);
|
||||
}
|
||||
|
||||
:where(button, .btn, input[type="file"]) {
|
||||
font-stretch: var(--font-stretch, condensed);
|
||||
}
|
||||
|
||||
:where(abbr) {
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted; // Differentiate abbreviaions from links.
|
||||
text-underline-offset: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(button, label, select, summary) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:where(summary:hover > *) {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(figcaption) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:where(th) {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
:where(th, td) {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
:where(fieldset > ol) {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
Spacing
|
||||
\* ------------------------------------ */
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, p, figure, form, pre, blockquote, ul, ol, dl, li, details) {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6) {
|
||||
margin-block-start: calc(var(--stack) * 1.75);
|
||||
}
|
||||
|
||||
:where(p, figure, form, fieldset, pre, blockquote, ul, ol, dl, details) {
|
||||
margin-inline: 0;
|
||||
margin-block-start: var(--stack);
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, p, figure, form, fieldset, pre, blockquote, ul, ol, dl, details):first-child,
|
||||
:where(legend + *) {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6) + * {
|
||||
margin-block-start: calc(var(--stack) / 5);
|
||||
}
|
||||
|
||||
:where(ul, ol) {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:where(li > ul, li > ol) {
|
||||
margin-block-start: calc(var(--stack) / 5);
|
||||
}
|
||||
|
||||
:where(details ul, details ol) {
|
||||
margin-inline-start: 4ch; // Unify indent for all lists inside details.
|
||||
}
|
||||
|
||||
:where(li > ul, li > ol, fieldset ul, fieldset ol) {
|
||||
margin-inline-start: 2.25ch; // Unify indent for all nested lists.
|
||||
}
|
||||
|
||||
:where(li + li) {
|
||||
margin-block-start: calc(var(--stack) / 5);
|
||||
}
|
||||
|
||||
:where(fieldset > ol li + li) {
|
||||
margin-block-start: calc(var(--stack) / 2);
|
||||
}
|
||||
|
||||
:where(fieldset > ol) {
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
||||
:where(hr) {
|
||||
margin-block-start: calc(var(--stack) * 3);
|
||||
margin-block-end: calc(var(--stack) * 3);
|
||||
}
|
||||
|
||||
:where(hr + *) {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
:where(figure > img, table) {
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
:where(blockquote > *) {
|
||||
margin-block-start: calc(var(--stack) / 4);
|
||||
}
|
||||
|
||||
:where(blockquote:not(:last-child)) {
|
||||
padding-block-end: calc(var(--stack) / 2);
|
||||
}
|
||||
|
||||
:where(button, .btn, dd, th, td) {
|
||||
// Unify inset spacing on bordered elements.
|
||||
padding-block: calc(var(--stack) / 6);
|
||||
padding-inline: calc(var(--gutter) / 3);
|
||||
}
|
||||
|
||||
:where(input, textarea) {
|
||||
padding-inline: 2px;
|
||||
}
|
||||
|
||||
:where(caption, figcaption) {
|
||||
padding-block: calc(var(--stack) / 2);
|
||||
}
|
||||
|
||||
:where(code, kbd) {
|
||||
padding-block: 0.25ex;
|
||||
padding-inline: 0.5ch;
|
||||
}
|
||||
|
||||
:where(figure, pre) {
|
||||
padding-block-start: calc(
|
||||
var(--stack) / 2.5
|
||||
); // Line up top of images/codeblocks with text in an adjacent column layout.
|
||||
}
|
||||
|
||||
:where(pre) {
|
||||
padding-block-end: calc(var(--stack) / 2.5);
|
||||
}
|
||||
|
||||
:where(pre code) {
|
||||
padding-block: var(--stack);
|
||||
padding-inline: var(--gutter);
|
||||
}
|
||||
|
||||
details[open] summary + * {
|
||||
margin-block-start: calc(var(--stack) / 4);
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
General
|
||||
\* ------------------------------------ */
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
font-feature-settings: "kern";
|
||||
font-kerning: normal;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:where(input, textarea, select, fieldset, button, kbd, dd, table, th, td) {
|
||||
// Unify border styles.
|
||||
border: var(--border-width) solid var(--text);
|
||||
}
|
||||
|
||||
:where(input, textarea, select, fieldset, button, .btn, kbd) {
|
||||
// Unify interactive elements border radius.
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
:where(pre) {
|
||||
white-space: -moz-pre-wrap;
|
||||
white-space: -o-pre-wrap;
|
||||
white-space: pre-wrap;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
:where(dl) {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(75%, 1fr);
|
||||
gap: calc(var(--gutter) / 2);
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
:where(dt) {
|
||||
border-block-end: var(--border-width) dotted;
|
||||
}
|
||||
|
||||
:where(dd) {
|
||||
block-size: 100%;
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
|
||||
display: block;
|
||||
inline-size: 100%;
|
||||
}
|
||||
|
||||
:where(input[type="radio"], input[type="checkbox"]) {
|
||||
size: 1.5ex;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
:where(input[type="file"]) {
|
||||
padding-inline: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
appearance: button;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
:where(input, textarea, select) ~ * {
|
||||
margin-block-start: 0;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
:where(input:required + mark) {
|
||||
display: none;
|
||||
color: var(--text);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
:where(input:required:invalid + mark) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:where(hr) {
|
||||
block-size: 0;
|
||||
border: 0;
|
||||
border-block-start: var(--border-width) dashed var(--text);
|
||||
}
|
||||
|
||||
:where(figure, figure table) {
|
||||
inline-size: 100%;
|
||||
}
|
||||
|
||||
:where(figure) {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
:where(figure > img) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:where(table) {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
:where(tr > *:first-child) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:where(summary > *) {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
Add-ons
|
||||
- Requires data attributes.
|
||||
- Remove to do your own layouts.
|
||||
\* ------------------------------------ */
|
||||
|
||||
:where(body main) {
|
||||
padding-block-start: clamp(var(--stack) * 1, 10vmax, var(--stack) * 2);
|
||||
}
|
||||
|
|
@ -2,12 +2,15 @@
|
|||
--light-1: #efefef;
|
||||
--dark-1: #1e1e1e;
|
||||
--dark-2: #0f0f0f;
|
||||
--primary: #C2B280;
|
||||
--primary-light: #D3C7A2;
|
||||
--primary-dark: #BAB298;
|
||||
--secondary: #B3CF99;
|
||||
--secondary-light: #C2D9AD;
|
||||
--secondary-dark: #9FAF8F;
|
||||
|
||||
--primary-hsl: 45, 35%, 63%;
|
||||
--primary: hsl(var(--primary-hsl));
|
||||
--primary-light: hsl(45, 36%, 73%);
|
||||
--primary-dark: hsl(46, 20%, 66%);
|
||||
--secondary-hsl: 91, 36%, 71%;
|
||||
--secondary: hsl(var(--secondary-hsl));
|
||||
--secondary-light: hsl(91, 37%, 76%);
|
||||
--secondary-dark: hsl(90, 17%, 62%);
|
||||
|
||||
--background: var(--primary-light);
|
||||
--text: var(--dark-1);
|
||||
|
|
|
|||
|
|
@ -1,420 +1,12 @@
|
|||
@use './components/variables';
|
||||
@use './components/reset';
|
||||
@use './components/superminimal';
|
||||
@use './components/utilities';
|
||||
@use './components/focus';
|
||||
@use './components/button';
|
||||
@use './components/skip-link';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------ *\
|
||||
https://codepen.io/mikemai2awesome/full/KKvMZVz
|
||||
\* ------------------------------------ */
|
||||
|
||||
:root {
|
||||
color: var(--text);
|
||||
background-color: var(--background);
|
||||
accent-color: var(--text);
|
||||
}
|
||||
|
||||
:where(a) {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
:where(input, textarea, select) {
|
||||
color: var(--text);
|
||||
background-color: var(--background);
|
||||
}
|
||||
|
||||
:where(button, .btn) {
|
||||
color: var(--primary-light);
|
||||
background-color: var(--text);
|
||||
}
|
||||
|
||||
:where(code) {
|
||||
color: var(--text);
|
||||
background-color: var(--primary-dark);
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
Typography
|
||||
\* ------------------------------------ */
|
||||
|
||||
:root {
|
||||
font-size: clamp(
|
||||
var(--font-size),
|
||||
var(--font-size) * 0.9 + 0.25vw,
|
||||
var(--font-size) * 2
|
||||
); // % ensures browser zoom is supported.
|
||||
font-family: var(--font); // Use system UI font.
|
||||
font-weight: var(--font-weight-regular);
|
||||
line-height: var(--leading); // Standard leading for good legibility.
|
||||
letter-spacing: var(--tracking);
|
||||
}
|
||||
|
||||
:where(a) {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: var(--border-width);
|
||||
text-underline-offset: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(a):hover {
|
||||
text-decoration-thickness: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(pre, code, kbd, dl, figcaption, abbr, table) {
|
||||
font-family: var(
|
||||
--font-code
|
||||
); // Differentiate preformatted, code, description, and table text from body text.
|
||||
|
||||
font-size: 0.8em; // Make monospace and small text smaller than body text.
|
||||
}
|
||||
|
||||
:where(big) {
|
||||
font-size: 1.2em; // <big> is technically deprecated, but I love using it. This creates a fallback if a browser doesn't support it.
|
||||
letter-spacing: 0.006em;
|
||||
}
|
||||
|
||||
:where(pre code) {
|
||||
display: block; // Define block code.
|
||||
font-size: 1em; // Prevent cascading.
|
||||
}
|
||||
|
||||
:where(blockquote, em, i, cite) {
|
||||
font-family: var(
|
||||
--font-italic
|
||||
); // Differentiate blockquote, citation, idiomatic, and emphasisized text from body text. Also, sans-serif italic is ugly.
|
||||
font-weight: var(
|
||||
--font-weight-regular
|
||||
); // Prevent italics to be bold. Bold italic is also ugly and unnecessary.
|
||||
}
|
||||
|
||||
:where(blockquote) {
|
||||
font-size: clamp(1.5rem, 1.25rem + 1vw, 3rem);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
:where(blockquote p) {
|
||||
max-inline-size: 35ch;
|
||||
}
|
||||
|
||||
:where(blockquote q):before {
|
||||
position: absolute;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
:where(strong, b, th, button, .btn) {
|
||||
font-weight: var(
|
||||
--font-weight-semibold
|
||||
); // Make non-heading emphasized text less bold than heading text.
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, summary strong, legend) {
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, summary strong, legend, big) {
|
||||
font-stretch: var(--font-stretch, expanded);
|
||||
}
|
||||
|
||||
:where(button, .btn, input[type="file"]) {
|
||||
font-stretch: var(--font-stretch, condensed);
|
||||
}
|
||||
|
||||
:where(abbr) {
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted; // Differentiate abbreviaions from links.
|
||||
text-underline-offset: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(button, label, select, summary) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:where(summary:hover > *) {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: calc(var(--border-width) * 2);
|
||||
}
|
||||
|
||||
:where(figcaption) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:where(th) {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
:where(th, td) {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
:where(fieldset > ol) {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
Spacing
|
||||
\* ------------------------------------ */
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, p, figure, form, pre, blockquote, ul, ol, dl, li, details) {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6) {
|
||||
margin-block-start: calc(var(--stack) * 1.75);
|
||||
}
|
||||
|
||||
:where(p, figure, form, fieldset, pre, blockquote, ul, ol, dl, details) {
|
||||
margin-inline: 0;
|
||||
margin-block-start: var(--stack);
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6, p, figure, form, fieldset, pre, blockquote, ul, ol, dl, details):first-child,
|
||||
:where(legend + *) {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
:where(h1, h2, h3, h4, h5, h6) + * {
|
||||
margin-block-start: calc(var(--stack) / 5);
|
||||
}
|
||||
|
||||
// :where(ul, ol) {
|
||||
// padding: 0;
|
||||
// }
|
||||
|
||||
:where(li > ul, li > ol) {
|
||||
margin-block-start: calc(var(--stack) / 5);
|
||||
}
|
||||
|
||||
:where(details ul, details ol) {
|
||||
margin-inline-start: 4ch; // Unify indent for all lists inside details.
|
||||
}
|
||||
|
||||
:where(li > ul, li > ol, fieldset ul, fieldset ol) {
|
||||
margin-inline-start: 2.25ch; // Unify indent for all nested lists.
|
||||
}
|
||||
|
||||
:where(li + li) {
|
||||
margin-block-start: calc(var(--stack) / 5);
|
||||
}
|
||||
|
||||
:where(fieldset > ol li + li) {
|
||||
margin-block-start: calc(var(--stack) / 2);
|
||||
}
|
||||
|
||||
:where(fieldset > ol) {
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
||||
:where(hr) {
|
||||
margin-block-start: calc(var(--stack) * 3);
|
||||
margin-block-end: calc(var(--stack) * 3);
|
||||
}
|
||||
|
||||
:where(hr + *) {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
:where(figure > img, table) {
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
:where(blockquote > *) {
|
||||
margin-block-start: calc(var(--stack) / 4);
|
||||
}
|
||||
|
||||
:where(blockquote:not(:last-child)) {
|
||||
padding-block-end: calc(var(--stack) / 2);
|
||||
}
|
||||
|
||||
:where(button, .btn, dd, th, td) {
|
||||
// Unify inset spacing on bordered elements.
|
||||
padding-block: calc(var(--stack) / 6);
|
||||
padding-inline: calc(var(--gutter) / 3);
|
||||
}
|
||||
|
||||
:where(input, textarea) {
|
||||
padding-inline: 2px;
|
||||
}
|
||||
|
||||
:where(caption, figcaption) {
|
||||
padding-block: calc(var(--stack) / 2);
|
||||
}
|
||||
|
||||
:where(code, kbd) {
|
||||
padding-block: 0.25ex;
|
||||
padding-inline: 0.5ch;
|
||||
}
|
||||
|
||||
:where(figure, pre) {
|
||||
padding-block-start: calc(
|
||||
var(--stack) / 2.5
|
||||
); // Line up top of images/codeblocks with text in an adjacent column layout.
|
||||
}
|
||||
|
||||
:where(pre) {
|
||||
padding-block-end: calc(var(--stack) / 2.5);
|
||||
}
|
||||
|
||||
:where(pre code) {
|
||||
padding-block: var(--stack);
|
||||
padding-inline: var(--gutter);
|
||||
}
|
||||
|
||||
details[open] summary + * {
|
||||
margin-block-start: calc(var(--stack) / 4);
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
General
|
||||
\* ------------------------------------ */
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
font-feature-settings: "kern";
|
||||
font-kerning: normal;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:where(input, textarea, select, fieldset, button, kbd, dd, table, th, td) {
|
||||
// Unify border styles.
|
||||
border: var(--border-width) solid var(--text);
|
||||
}
|
||||
|
||||
:where(input, textarea, select, fieldset, button, .btn, kbd) {
|
||||
// Unify interactive elements border radius.
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
:where(pre) {
|
||||
white-space: -moz-pre-wrap;
|
||||
white-space: -o-pre-wrap;
|
||||
white-space: pre-wrap;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
:where(dl) {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(75%, 1fr);
|
||||
gap: calc(var(--gutter) / 2);
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
:where(dt) {
|
||||
border-block-end: var(--border-width) dotted;
|
||||
}
|
||||
|
||||
:where(dd) {
|
||||
block-size: 100%;
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
|
||||
display: block;
|
||||
inline-size: 100%;
|
||||
}
|
||||
|
||||
:where(input[type="radio"], input[type="checkbox"]) {
|
||||
size: 1.5ex;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
:where(input[type="file"]) {
|
||||
padding-inline: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
appearance: button;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
:where(input, textarea, select) ~ * {
|
||||
margin-block-start: 0;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
:where(input:required + mark) {
|
||||
display: none;
|
||||
color: var(--text);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
:where(input:required:invalid + mark) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:where(hr) {
|
||||
block-size: 0;
|
||||
border: 0;
|
||||
border-block-start: var(--border-width) dashed var(--text);
|
||||
}
|
||||
|
||||
:where(figure, figure table) {
|
||||
inline-size: 100%;
|
||||
}
|
||||
|
||||
:where(figure) {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
:where(figure > img) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:where(table) {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
:where(tr > *:first-child) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:where(summary > *) {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* ------------------------------------ *\
|
||||
Add-ons
|
||||
- Requires data attributes.
|
||||
- Remove to do your own layouts.
|
||||
\* ------------------------------------ */
|
||||
|
||||
:where(body main) {
|
||||
padding-block-start: clamp(var(--stack) * 1, 10vmax, var(--stack) * 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body {
|
||||
body {
|
||||
--start: var(--primary-light);
|
||||
--end: var(--secondary);
|
||||
background: var(--start);
|
||||
|
|
@ -423,22 +15,14 @@
|
|||
header, footer {
|
||||
padding: .5rem clamp(.2rem, 3vw, 2rem);
|
||||
}
|
||||
}
|
||||
header {
|
||||
}
|
||||
header {
|
||||
background-color: var(--primary);
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
inset-block-start: 0;
|
||||
inset-inline: 0;
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
&.wrapper-full {
|
||||
nav {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
ul {
|
||||
display: flex;
|
||||
|
|
@ -448,6 +32,7 @@
|
|||
|
||||
@media screen and (max-width: 767px) {
|
||||
justify-content: start;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -455,6 +40,7 @@
|
|||
padding: 6px 20px;
|
||||
padding: 6px clamp(10px, 3vw, 20px);
|
||||
margin: 0;
|
||||
text-align: end;
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
display: inline-block;
|
||||
|
|
@ -467,10 +53,11 @@
|
|||
font-weight: var(--font-weight-semibold)
|
||||
}
|
||||
}
|
||||
}
|
||||
main {
|
||||
}
|
||||
main {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
h2 {
|
||||
margin-block: 2rem 1rem;
|
||||
font-size: calc(var(--font-size) * 1.6);
|
||||
|
|
@ -490,20 +77,21 @@
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
footer {
|
||||
}
|
||||
footer {
|
||||
background-color: var(--secondary);
|
||||
justify-items: center;
|
||||
margin-block-start: 1.5rem;
|
||||
|
||||
.list-inline {
|
||||
a {
|
||||
text-decoration: underline;
|
||||
--item-color: var(--text-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
i {
|
||||
i {
|
||||
vertical-align: text-top;
|
||||
fill: var(--fill-color, var(--primary-light));
|
||||
display: inline-block;
|
||||
|
|
@ -512,31 +100,33 @@
|
|||
aspect-ratio: 1;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hero-section {
|
||||
.hero-section {
|
||||
height: 65vh;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.projects-section {
|
||||
@media screen and (max-width: 767px) {
|
||||
height: 85vh;
|
||||
}
|
||||
}
|
||||
|
||||
.projects-section {
|
||||
ul {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
li {
|
||||
border-radius: var(--border-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
article {
|
||||
--background: url('https://placehold.co/200x150');
|
||||
--background: url('https://placehold.co/200x150'); // Default background
|
||||
position: relative;
|
||||
height: 100%;
|
||||
padding: .4rem;
|
||||
|
|
@ -579,14 +169,14 @@
|
|||
.content {
|
||||
padding: 1rem .4rem 0 .4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.about-section,
|
||||
.projects-section,
|
||||
.experiences-section {
|
||||
.about-section,
|
||||
.projects-section,
|
||||
.experiences-section {
|
||||
padding-block: 2rem;
|
||||
}
|
||||
.about {
|
||||
}
|
||||
.about {
|
||||
display: flex;
|
||||
gap: 2rem;
|
||||
align-items: center;
|
||||
|
|
@ -622,9 +212,9 @@
|
|||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.timeline {
|
||||
.timeline {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
|
@ -671,13 +261,13 @@
|
|||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.experiences-section {
|
||||
.experiences-section {
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.download-section {
|
||||
text-align: center;
|
||||
|
|
|
|||
Loading…
Reference in a new issue