initial commit
This commit is contained in:
commit
c7c8fc4e67
24 changed files with 1328 additions and 0 deletions
226
styles/base.css
Normal file
226
styles/base.css
Normal file
|
@ -0,0 +1,226 @@
|
|||
/* BASE */
|
||||
::placeholder {
|
||||
color: var(--color-dark);
|
||||
opacity: 0.8;
|
||||
}
|
||||
::selection,
|
||||
::target-text {
|
||||
color: var(--color-light-blue);
|
||||
background-color: var(--color-dark-blue);
|
||||
}
|
||||
::target-text {
|
||||
color: var(--color-soft-blue);
|
||||
background-color: var(--color-blue);
|
||||
}
|
||||
::marker {
|
||||
color: var(--color-brique);
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: var(--size-0);
|
||||
line-height: 1.5;
|
||||
color: var(--color-dark);
|
||||
background-color: var(--color-light-white);
|
||||
accent-color: var(--color-brique);
|
||||
}
|
||||
|
||||
:is(h1, h2, h3, h4, .h2, .h3, .h4) {
|
||||
font-weight: bold;
|
||||
}
|
||||
:where(h1, h2, h3, h4, .h2, .h3, .h4) + * {
|
||||
margin-block-start: var(--space-s);
|
||||
}
|
||||
:is(h1) {
|
||||
max-inline-size: 20ch;
|
||||
font-size: var(--size-5);
|
||||
color: var(--color-dark-blue);
|
||||
}
|
||||
|
||||
h2,
|
||||
.h2 {
|
||||
font-size: var(--size-3);
|
||||
color: var(--color-dark-blue);
|
||||
}
|
||||
|
||||
h3,
|
||||
.h3 {
|
||||
max-inline-size: initial;
|
||||
font-size: var(--size-2);
|
||||
letter-spacing: 0.05rem;
|
||||
}
|
||||
|
||||
h4,
|
||||
.h4 {
|
||||
font-size: var(--size-2);
|
||||
color: var(--color-dark);
|
||||
}
|
||||
|
||||
h5,
|
||||
.h5 {
|
||||
font-size: var(--size-1);
|
||||
color: var(--color-darkBlue);
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: var(--color-blue);
|
||||
text-decoration: underline;
|
||||
}
|
||||
/* a:visited {
|
||||
color: currentColor;
|
||||
} */
|
||||
a:hover,
|
||||
a:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-block: var(--space-m-l);
|
||||
block-size: 4px;
|
||||
background-color: var(--color-dark);
|
||||
}
|
||||
hr.small {
|
||||
margin-block: var(--space-xs);
|
||||
block-size: 2px;
|
||||
}
|
||||
|
||||
ul:not([role='list']),
|
||||
ol:not([role='list']) {
|
||||
padding-inline-start: 1rem;
|
||||
}
|
||||
|
||||
ul:not([role='list']) > li + li,
|
||||
ol:not([role='list']) > li + li {
|
||||
margin-block-start: var(--space-xs);
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
block-size: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
inline-size: 1px;
|
||||
}
|
||||
|
||||
.clean-button {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
background: none;
|
||||
}
|
||||
.btn {
|
||||
padding: var(--space-2xs) var(--space-xs);
|
||||
margin-block: var(--space-s);
|
||||
display: inline-block;
|
||||
font-size: var(--size-0);
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
border: 2px solid var(--color-blue);
|
||||
border-radius: var(--radius-small);
|
||||
color: var(--color-white);
|
||||
background-color: var(--color-blue);
|
||||
transition-property: color, background-color;
|
||||
transition-duration: 0.3s;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: var(--color-blue);
|
||||
background-color: var(--color-white);
|
||||
}
|
||||
|
||||
button[disabled] {
|
||||
cursor: not-allowed;
|
||||
color: var(--color-grey-dark);
|
||||
border-color: var(--color-grey);
|
||||
background-color: var(--color-white);
|
||||
}
|
||||
|
||||
.highlight {
|
||||
color: var(--color-blue);
|
||||
}
|
||||
|
||||
/* clean style link */
|
||||
.clean-link {
|
||||
text-decoration: none;
|
||||
font-weight: inherit;
|
||||
color: currentColor;
|
||||
}
|
||||
.clean-link:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* nice hover link */
|
||||
.nice-link {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.nice-link:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.nice-link::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -2px;
|
||||
inline-size: 100%;
|
||||
block-size: 2px;
|
||||
text-decoration: none;
|
||||
transform: scaleX(0);
|
||||
opacity: 1;
|
||||
transform-origin: 100% 50%;
|
||||
background-color: var(--color-brique);
|
||||
}
|
||||
.nice-link:hover::after {
|
||||
transform: scaleX(1);
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.nice-link::after {
|
||||
transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* blockquote */
|
||||
blockquote {
|
||||
margin: var(--space-s) 0;
|
||||
padding: var(--space-s);
|
||||
font-weight: normal;
|
||||
line-height: 1.4;
|
||||
border-left: 3px solid var(--color-blue);
|
||||
border-radius: 3px;
|
||||
background-color: var(--color-soft-blue);
|
||||
}
|
||||
blockquote cite {
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: var(--size-0);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
/* GRID WRAPPER */
|
||||
display: grid;
|
||||
grid-template-columns: var(--grid-wrapper);
|
||||
--_content-padding: var(--content-padding, var(--space-s));
|
||||
column-gap: var(--_content-padding);
|
||||
}
|
||||
/* set content inside wrapper column */
|
||||
:where(.wrapper, .slidev-layout) > * {
|
||||
grid-column: wrapper;
|
||||
}
|
||||
|
||||
/* set full width content to full grid */
|
||||
:where(.wrapper, .slidev-layout) > .full-width {
|
||||
/* calculate inline padding based on available space minus content space to align full-width content with wrapper content */
|
||||
padding-inline: max(
|
||||
calc((100vw - var(--content-width)) / 2),
|
||||
var(--_content-padding)
|
||||
);
|
||||
grid-column: full;
|
||||
}
|
5
styles/index.ts
Normal file
5
styles/index.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import '@unocss/reset/normalize.css'
|
||||
import './reset.css'
|
||||
import './variables.css'
|
||||
import './base.css'
|
||||
import './layouts.css'
|
8
styles/layouts.css
Normal file
8
styles/layouts.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
.slidev-layout {
|
||||
@apply: grid-wrapper;
|
||||
padding-block: var(--space-m-l);
|
||||
}
|
||||
|
||||
.bullets :where(ul, ol, dl) {
|
||||
list-style-type: initial;
|
||||
}
|
188
styles/reset.css
Normal file
188
styles/reset.css
Normal file
|
@ -0,0 +1,188 @@
|
|||
/* RESET */
|
||||
|
||||
:root {
|
||||
--font-tnum: 'tnum' on;
|
||||
}
|
||||
|
||||
* {
|
||||
/* Remove default margin on everything */
|
||||
margin: 0;
|
||||
/* Remove default padding on everything */
|
||||
padding: 0;
|
||||
/* Calc `em` based line height, bigger line height for smaller font size and smaller line height for bigger font size: https://kittygiraudel.com/2020/05/18/using-calc-to-figure-out-optimal-line-height/ */
|
||||
line-height: calc(0.25rem + 1em + 0.25rem);
|
||||
}
|
||||
|
||||
/* Use a more-intuitive box-sizing model on everything */
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Remove border and set sensible defaults for backgrounds, on all elements except fieldset progress and meter */
|
||||
*:where(:not(fieldset, progress, meter)) {
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
background-origin: border-box;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@supports (font-variant-numeric: tabular-nums) {
|
||||
html {
|
||||
--font-tnum: '____';
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
html {
|
||||
/* Allow percentage-based heights in the application */
|
||||
block-size: 100%;
|
||||
/* Making sure text size is only controlled by font-size */
|
||||
-webkit-text-size-adjust: none;
|
||||
/* Improve text rendering */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-feature-settings: var(--font-tnum);
|
||||
}
|
||||
|
||||
/* Smooth scrolling for users that don't prefer reduced motion */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
html:focus-within {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
font-weight: normal;
|
||||
/* Allow percentage-based heights in the application */
|
||||
min-block-size: 100%;
|
||||
/* https://www.sarasoueidan.com/blog/safari-fluid-typography-bug-fix/ */
|
||||
-webkit-marquee-increment: 0vw;
|
||||
}
|
||||
|
||||
/* Improve media defaults */
|
||||
:where(img, svg, video, canvas, audio, iframe, embed, object) {
|
||||
display: block;
|
||||
}
|
||||
:where(img, svg, video) {
|
||||
block-size: auto;
|
||||
max-inline-size: 100%;
|
||||
}
|
||||
|
||||
:where(details) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Remove stroke and set fill colour to the inherited font colour */
|
||||
:where(svg) {
|
||||
stroke: none;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* Set a size for SVG's without a width attribute */
|
||||
:where(svg):where(:not([width])) {
|
||||
inline-size: 5rem;
|
||||
}
|
||||
|
||||
/* Remove built-in form typography styles */
|
||||
:where(input, button, textarea, select),
|
||||
:where(input[type='file'])::-webkit-file-upload-button {
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
/* Change textarea resize to vertical only and block only if the browser supports that */
|
||||
:where(textarea) {
|
||||
resize: vertical;
|
||||
}
|
||||
@supports (resize: block) {
|
||||
:where(textarea) {
|
||||
resize: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Avoid text overflows */
|
||||
:where(h1, h2, h3) {
|
||||
line-height: 1.1;
|
||||
}
|
||||
:where(p, h1, h2, h3, h4, h5, h6) {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
||||
:where(ul, ol)[role='list'] {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* More readable underline style for anchor tags without a class. This could be set on anchor tags globally, but it can cause conflicts. */
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto;
|
||||
}
|
||||
|
||||
/* Make it clear that interactive elements are interactive */
|
||||
:where(
|
||||
a[href],
|
||||
area,
|
||||
button,
|
||||
input,
|
||||
label[for],
|
||||
select,
|
||||
summary,
|
||||
textarea,
|
||||
[tabindex]:not([tabindex*='-'])
|
||||
) {
|
||||
cursor: pointer;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
:where(input[type='file']) {
|
||||
cursor: auto;
|
||||
}
|
||||
:where(input[type='file'])::-webkit-file-upload-button,
|
||||
:where(input[type='file'])::file-selector-button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Animate focus outline */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:focus-visible {
|
||||
transition: outline-offset 145ms cubic-bezier(0.25, 0, 0.4, 1);
|
||||
}
|
||||
:where(:not(:active)):focus-visible {
|
||||
transition-duration: 0.25s;
|
||||
}
|
||||
}
|
||||
:where(:not(:active)):focus-visible {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Make sure users can't select button text */
|
||||
:where(
|
||||
button,
|
||||
button[type],
|
||||
input[type='button'],
|
||||
input[type='submit'],
|
||||
input[type='reset']
|
||||
),
|
||||
:where(input[type='file'])::-webkit-file-upload-button,
|
||||
:where(input[type='file'])::file-selector-button {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none;
|
||||
user-select: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Disabled cursor for disabled buttons */
|
||||
:where(
|
||||
button,
|
||||
button[type],
|
||||
input[type='button'],
|
||||
input[type='submit'],
|
||||
input[type='reset']
|
||||
)[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* END RESET */
|
95
styles/variables.css
Normal file
95
styles/variables.css
Normal file
|
@ -0,0 +1,95 @@
|
|||
/* VARIABLES */
|
||||
|
||||
:root {
|
||||
/* font sizes
|
||||
https://utopia.fyi/type/calculator?c=320,18,1.2,1040,20,1.25,5,2,&s=0.75%7C0.5%7C0.25,1.5%7C2%7C3%7C4%7C6,m-xl&g=s,l,xl,12
|
||||
*/
|
||||
--size--1: clamp(0.94rem, calc(0.91rem + 0.14vw), 1rem);
|
||||
--size-0: clamp(1.13rem, calc(1.07rem + 0.28vw), 1.25rem);
|
||||
--size-1: clamp(1.35rem, calc(1.26rem + 0.47vw), 1.56rem);
|
||||
--size-2: clamp(1.62rem, calc(1.47rem + 0.74vw), 1.95rem);
|
||||
--size-3: clamp(1.94rem, calc(1.72rem + 1.11vw), 2.44rem);
|
||||
--size-4: clamp(2.33rem, calc(2.01rem + 1.6vw), 3.05rem);
|
||||
--size-5: clamp(2.8rem, calc(2.35rem + 2.26vw), 3.82rem);
|
||||
--size-6: clamp(3.36rem, calc(2.73rem + 3.13vw), 4.77rem);
|
||||
--size-7: clamp(4.03rem, calc(3.17rem + 4.29vw), 5.96rem);
|
||||
--size-8: clamp(4.84rem, calc(3.68rem + 5.81vw), 7.45rem);
|
||||
|
||||
/* spaces
|
||||
https://utopia.fyi/space/calculator?c=320,18,1.2,1040,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,m-xl&g=s,l,xl,12
|
||||
*/
|
||||
--space-3xs: clamp(0.31rem, calc(0.31rem + 0vw), 0.31rem);
|
||||
--space-2xs: clamp(0.56rem, calc(0.53rem + 0.14vw), 0.63rem);
|
||||
--space-xs: clamp(0.88rem, calc(0.85rem + 0.14vw), 0.94rem);
|
||||
--space-s: clamp(1.13rem, calc(1.07rem + 0.28vw), 1.25rem);
|
||||
--space-m: clamp(1.69rem, calc(1.6rem + 0.42vw), 1.88rem);
|
||||
--space-l: clamp(2.25rem, calc(2.14rem + 0.56vw), 2.5rem);
|
||||
--space-xl: clamp(3.38rem, calc(3.21rem + 0.83vw), 3.75rem);
|
||||
--space-2xl: clamp(4.5rem, calc(4.28rem + 1.11vw), 5rem);
|
||||
--space-3xl: clamp(6.75rem, calc(6.42rem + 1.67vw), 7.5rem);
|
||||
|
||||
/* One-up pairs */
|
||||
--space-3xs-2xs: clamp(0.31rem, calc(0.17rem + 0.69vw), 0.63rem);
|
||||
--space-2xs-xs: clamp(0.56rem, calc(0.4rem + 0.83vw), 0.94rem);
|
||||
--space-xs-s: clamp(0.88rem, calc(0.71rem + 0.83vw), 1.25rem);
|
||||
--space-s-m: clamp(1.13rem, calc(0.79rem + 1.67vw), 1.88rem);
|
||||
--space-m-l: clamp(1.69rem, calc(1.33rem + 1.81vw), 2.5rem);
|
||||
--space-l-xl: clamp(2.25rem, calc(1.58rem + 3.33vw), 3.75rem);
|
||||
--space-xl-2xl: clamp(3.38rem, calc(2.65rem + 3.61vw), 5rem);
|
||||
--space-2xl-3xl: clamp(4.5rem, calc(3.17rem + 6.67vw), 7.5rem);
|
||||
|
||||
/* multi steps */
|
||||
--space-3xs-s: clamp(0.31rem, calc(-0.1rem + 2.08vw), 1.25rem);
|
||||
--space-2xs-s: clamp(0.56rem, calc(0.26rem + 1.53vw), 1.25rem);
|
||||
--space-2xs-m: clamp(0.56rem, calc(-0.02rem + 2.92vw), 1.88rem);
|
||||
--space-xs-m: clamp(0.88rem, calc(0.43rem + 2.22vw), 1.88rem);
|
||||
--space-xs-l: clamp(0.88rem, calc(0.15rem + 3.61vw), 2.5rem);
|
||||
--space-s-l: clamp(1.13rem, calc(0.51rem + 3.06vw), 2.5rem);
|
||||
--space-s-xl: clamp(1.13rem, calc(-0.04rem + 5.83vw), 3.75rem);
|
||||
--space-m-xl: clamp(1.69rem, calc(0.77rem + 4.58vw), 3.75rem);
|
||||
--space-l-2xl: clamp(2.25rem, calc(1.03rem + 6.11vw), 5rem);
|
||||
--space-l-3xl: clamp(2.25rem, calc(-0.08rem + 11.67vw), 7.5rem);
|
||||
|
||||
/* colors */
|
||||
--color-dark: hsl(239, 57%, 15%);
|
||||
--color-grey: hsl(211, 12%, 35%);
|
||||
--color-light-grey: hsl(0, 0%, 94%);
|
||||
--color-blue: hsl(253, 98%, 41%);
|
||||
--color-dark-blue: hsl(218, 60%, 21%);
|
||||
--color-light-blue: hsl(194, 54%, 89%);
|
||||
--color-blend-blue: hsl(253, 100%, 32%);
|
||||
--color-soft-blue: hsl(210, 73%, 94%);
|
||||
--color-violet: hsl(248, 73%, 52%);
|
||||
--color-brique: hsl(358, 54%, 54%);
|
||||
--color-white: hsl(0, 0%, 100%);
|
||||
--color-light-white: hsl(240, 50%, 98%);
|
||||
--color-black: hsl(0, 0%, 0%);
|
||||
|
||||
/* shadows */
|
||||
--shadow-color: 0deg 0% 80%;
|
||||
--shadow-elevation-medium: 0px 0.7px 0.7px hsl(var(--shadow-color) / 0.28),
|
||||
0px 1.5px 1.6px -0.7px hsl(var(--shadow-color) / 0.26),
|
||||
0px 2.9px 3px -1.5px hsl(var(--shadow-color) / 0.24),
|
||||
0px 6px 6.3px -2.2px hsl(var(--shadow-color) / 0.22),
|
||||
0px 11.8px 12.4px -3px hsl(var(--shadow-color) / 0.2);
|
||||
--shadow-elevation-high: 0px 0.5px 0.5px hsl(var(--shadow-color) / 0.18),
|
||||
0px 1.4px 1.5px -0.3px hsl(var(--shadow-color) / 0.18),
|
||||
0px 2.3px 2.4px -0.7px hsl(var(--shadow-color) / 0.17),
|
||||
0px 3.4px 3.6px -1px hsl(var(--shadow-color) / 0.16),
|
||||
0px 5.1px 5.4px -1.3px hsl(var(--shadow-color) / 0.16),
|
||||
0px 7.5px 7.9px -1.7px hsl(var(--shadow-color) / 0.15),
|
||||
0px 10.8px 11.3px -2px hsl(var(--shadow-color) / 0.15),
|
||||
-0.1px 15.4px 16.2px -2.3px hsl(var(--shadow-color) / 0.14),
|
||||
-0.1px 21.3px 22.4px -2.7px hsl(var(--shadow-color) / 0.13),
|
||||
-0.1px 28.9px 30.3px -3px hsl(var(--shadow-color) / 0.13);
|
||||
|
||||
/* radius */
|
||||
--radius: 20px;
|
||||
--radius-small: 10px;
|
||||
|
||||
/* grid */
|
||||
--content-width: 75rem;
|
||||
--grid-wrapper: [full-start] 1fr [wrapper-start]
|
||||
minmax(0, var(--content-width)) [wrapper-end] 1fr [full-end];
|
||||
--_content-padding: var(--content-padding, var(--space-s));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue