frontend-dorset/exercises/assets/css/style-12.css

126 lines
2.7 KiB
CSS

/* ============= WEB BROWSER RESETS ============ */
* { margin: 0; padding: 0; border: none }
*, *::before, *::after { box-sizing: border-box }
html { height: 100%; font-size: 100%; font: inherit; vertical-align: baseline;
scroll-behavior: smooth; scroll-padding-top: 20px }
body { max-width: 1920px; line-height: 1.5; margin-left: auto; margin-right: auto;
min-height: 100vh; text-rendering: optimizeSpeed }
img { width: 100%; height: auto; display: block }
h1, h2, h3, h4 { width: 100% }
input, button, textarea, select { font: inherit }
/* ================= ENDS ================ */
/* ======================= SECTIONS ======================== */
/* Regular and larger screens */
@media (min-width: 1200px) {
section {
margin-left: auto;
margin-right: auto;
padding: 3.5% 0 4% 0;
padding-left: calc( (100% - 1140px)/2 );
padding-right: calc( (100% - 1140px)/2 );
}
.section-narrow {
padding-left: calc( (100% - 920px)/2 );
padding-right: calc( (100% - 920px)/2 );
}
}
/* Tablets and smaller desktops */
@media (min-width: 1025px) and (max-width: 1199px) {
section { padding: 3% 10% 4% 10% }
}
/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
section { padding: 4% 5% 4% 5% }
}
/* Larger mobiles */
@media (min-width: 400px) and (max-width: 767px) {
section { padding: 7% 13% 8% 13% }
}
/* Smaller mobiles */
@media (max-width: 399px) {
section { padding: 7% 10% 8% 10% }
}
/* === COLUMN WIDTH ON MOBILES === */
@media (max-width: 767px) {
.bono, .edge, .adam, .larry {
width: 100%;
}
}
/* ==== Headings ==== */
h1 {
font-family: 'Roboto', sans-serif;
font-size: 64px;
text-align: center;
letter-spacing: -1px;
margin-bottom: 64px;
}
h3 {
font-family: 'Roboto', sans-serif;
font-size: 28px;
margin-bottom: 2px;
}
/* Paragraphs of text */
p {
font-family: 'Roboto', sans-serif;
font-size: 18px;
color: #696969;
line-height: 1.5
}
/* == FLEXBOX PARENT CONTAINER == */
.container-flexbox {
display: flex;
justify-content: space-between;
flex-wrap: wrap
}
.bono {
background-color: #4081ec;
padding: 12px;
margin-bottom: 40px;
width: 23%
}
.edge {
background-color: #ffbb33;
padding: 12px;
margin-bottom: 40px;
width: 23%
}
.adam {
background-color: #f73345;
padding: 12px;
margin-bottom: 40px;
width: 23%
}
.larry {
background-color: #e0e0e0;
padding: 12px;
margin-bottom: 40px;
width: 23%
}
.bono h3,
.bono p,
.adam h3,
.adam p { color: #fff }
.edge h3,
.edge p,
.larry h3,
.larry p { color: #000 }