75 lines
1 KiB
CSS
75 lines
1 KiB
CSS
/* Kevin Powell's root recommendation for '*''
|
|
* and also some bare bones defaults*/
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* kevin uses html here,
|
|
* but mdn recommends root */
|
|
:root {
|
|
color-scheme: light dark;
|
|
}
|
|
|
|
body {
|
|
font-family: system-ui;
|
|
font-size: 1.125rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* main container within body,
|
|
* sometimes called .container, etc. */
|
|
main {
|
|
width: min(70ch, 100% - 4rem);
|
|
margin-inline: auto;
|
|
}
|
|
|
|
img,
|
|
svg,
|
|
video {
|
|
max-width: 100%;
|
|
display: block;
|
|
}
|
|
|
|
/* TheoGG recommends this under '*',
|
|
* but kevin says differently */
|
|
input,
|
|
textarea {
|
|
min-width: 0;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
text-wrap: balance;
|
|
}
|
|
|
|
p,
|
|
li,
|
|
figcaption {
|
|
text-wrap: pretty;
|
|
max-width: 65ch;
|
|
}
|
|
|
|
header,
|
|
footer,
|
|
main,
|
|
section,
|
|
article {
|
|
container-type: inline-size;
|
|
}
|
|
|
|
/* background image specific, courtesy wittcode*/
|
|
/*
|
|
body {
|
|
background-image: url("background_image.png");
|
|
background-repeat: no-repeat;
|
|
background-attachment: fixed;
|
|
background-position: center;
|
|
background-size: cover;
|
|
}
|
|
*/
|