99 lines
1.7 KiB
CSS
99 lines
1.7 KiB
CSS
|
/* 1. Use a more-intuitive box-sizing model */
|
||
|
|
||
|
|
||
|
*, *::before, *::after {
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
/* 2. Remove default margin */
|
||
|
* {
|
||
|
margin: 0;
|
||
|
font-family: sans-serif;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
/* 3. Add accessible line-height */
|
||
|
line-height: 1.5;
|
||
|
/* 4. Improve text rendering */
|
||
|
-webkit-font-smoothing: antialiased;
|
||
|
padding: 0 1em;
|
||
|
height: 100vh;
|
||
|
background-image: radial-gradient(73% 147%, #EADFDF 59%, #ECE2DF 100%), radial-gradient(91% 146%, rgba(255,255,255,0.50) 47%, rgba(0,0,0,0.50) 100%);
|
||
|
background-blend-mode: screen;
|
||
|
}
|
||
|
|
||
|
/* 5. Improve media defaults */
|
||
|
img, picture, video, canvas, svg {
|
||
|
display: block;
|
||
|
max-width: 100%;
|
||
|
}
|
||
|
|
||
|
/* 6. Inherit fonts for form controls */
|
||
|
input, button, textarea, select {
|
||
|
font: inherit;
|
||
|
}
|
||
|
|
||
|
/* 7. Avoid text overflows */
|
||
|
p, h1, h2, h3, h4, h5, h6 {
|
||
|
overflow-wrap: break-word;
|
||
|
}
|
||
|
|
||
|
/* 8. Improve line wrapping */
|
||
|
p {
|
||
|
text-wrap: pretty;
|
||
|
}
|
||
|
h1, h2, h3, h4, h5, h6 {
|
||
|
text-wrap: balance;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
9. Create a root stacking context
|
||
|
*/
|
||
|
#root, #__next {
|
||
|
isolation: isolate;
|
||
|
}
|
||
|
|
||
|
|
||
|
body>header{
|
||
|
position: fixed;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
width: 100%;
|
||
|
height: 3em;
|
||
|
background: #ccc;
|
||
|
z-index: 99;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
padding: 0 1em;
|
||
|
}
|
||
|
|
||
|
main{
|
||
|
width: 100%;
|
||
|
height: calc(100vh - 4em);
|
||
|
padding-top: 4em;
|
||
|
display: grid;
|
||
|
grid-template-columns: repeat(2, minmax(25%, 50%));
|
||
|
grid-template-rows: repeat(2, 1fr);
|
||
|
gap: 1em;
|
||
|
|
||
|
}
|
||
|
|
||
|
article{
|
||
|
background: #f9f9f9;
|
||
|
border: .0625em solid #ccc;
|
||
|
box-shadow: 0 0 .3em #ccc;
|
||
|
border-radius: 3px;
|
||
|
display: grid;
|
||
|
}
|
||
|
|
||
|
article.header{
|
||
|
grid-template-columns: 100%;
|
||
|
grid-template-rows: 2em 1fr;
|
||
|
padding: 1em;
|
||
|
}
|
||
|
|
||
|
article>header>h2{
|
||
|
font-size: 1em;
|
||
|
font-weight: 600;
|
||
|
}
|