frontend-dorset/exercises/assets/css/global.css

188 lines
4.4 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: 1600px; 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 ================ */
/* Desktops */
@media (min-width: 768px) { body { padding: 4% 20% } }
/* Mobiles */
@media (max-width: 767px) { body { padding: 12% 8% } }
body {
font-family: sans-serif;
background-color: #3B1E00;
color : white;
text-align: center;
font-family: 'Fjalla One', sans-serif;
}
img {
border-radius: 50%;
width : 20%;
margin-top:100px;
display: block;
margin-left: auto;
margin-right: auto;
box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.75);
}
h1 {
font-size: 78px;
font-weight: normal;
letter-spacing: -2px;
margin-bottom: 12px;
line-height: 1.2;
font-family: 'Heebo', sans-serif;
}
h2 {
font-size: 42px;
letter-spacing: 6px;
margin-bottom: 48px;
line-height: 1.2;
}
h3 {
font-size: 24px;
margin-top: 48px;
margin-bottom: 20px;
line-height: 1.2;
text-transform: uppercase;
}
p {
font-size: 20px;
margin-bottom: 16px;
text-decoration: none;
color : lightgray;
}
p.hover {
color : white;
font-weight : bold;
}
a {
text-decoration: none;
color : lightgray;
}
a:hover {
color : white;
font-weight : bold;
animation:textSpawn 1s;
} @keyframes textSpawn{
0%{
opacity:0.3
}
100%{
opacity:1
}
}
.animate-spawn{
position:relative;
animation:animateSpawn 5s;
} @keyframes animateSpawn{
0%{
opacity:0
}
100%{
opacity:1
}
}
.head-bar-color {
background-color: antiquewhite;
color: #222;
margin-bottom: 30px;
margin-top: -50px;
}
/* ============= 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 }
h1, h2, h3, h4 { width: 100% }
input, button, textarea, select { font: inherit }
/* ================= ENDS ================ */
/* ============== HEADERS AND SECTIONS ============ */
/* Default header and widths */
header, section { width: 100% }
/* Last element at bottom of header or section */
header *:last-child, section *:last-child { margin-bottom: 0 }
/* ======================= 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% }
}
/* Coloured backgrounds */
.bg-header { background-color: #f5f9fb }
.bg-blue-light { background-color: #d8f0f5 }
.bg-blue-dark { background-color: #1435b3 }
/* Light blue section background: h1 headings and p text paragraphs */
.bg-blue-light h1 { color: #1435b3 }
.bg-blue-light p { color: #222 }
/* Dark blue section background: h1 headings and p text paragraphs */
.bg-blue-dark h1 { color: #fff }
.bg-blue-dark p { color: #fff }
/* =============== UTILTY CLASSES ============== */
.text-center { text-align: center !important }
.link {
border-bottom: 1px solid lightblue;
}