Last active
November 4, 2019 22:05
-
-
Save manavm1990/055b4cc7087efa8b8559c8d0e7136de7 to your computer and use it in GitHub Desktop.
Starter CSS for Demo SPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Developer's Notes: | |
1. We add these CSS selectors 'roughly' in the order that we encounter them on the page. | |
2. We maintain 'neat and orderly' code, being mindful of any/all 'red marks.' | |
*/ | |
body { | |
color: #333; | |
font-family: "Roboto", sans-serif; | |
font-size: 10px; | |
font-weight: 400; | |
line-height: 1.45; | |
margin: 0 auto; | |
max-width: 80vw; | |
} | |
header, | |
figure, | |
ul { | |
text-align: center; | |
} | |
h1 { | |
font-size: 3.052em; | |
} | |
/* Responsive images. */ | |
figure, | |
img { | |
max-width: 100%; | |
} | |
figcaption { | |
font-size: 1.25em; | |
} | |
li, | |
label, | |
input { | |
font-size: 1.953em; | |
/* Remove annoying default bullets. */ | |
list-style: none; | |
} | |
form, | |
footer { | |
border-top: solid thin black; | |
padding: 0.8rem 3px; | |
} | |
.container--form div { | |
margin-bottom: 0.8rem; | |
} | |
form div:not(.container--form) { | |
display: flex; | |
flex-direction: column; | |
} | |
input { | |
max-width: 550px; | |
} | |
input[type="submit"] { | |
border-radius: 3px; | |
background: green; | |
color: white; | |
margin-top: 0.8rem; | |
padding: 0.4rem; | |
} | |
.container--form { | |
display: flex; | |
flex-direction: column; | |
} | |
.container--students { | |
display: grid; | |
grid-gap: 8px; | |
/* Create 3 columns each taking up approximately 33% of the available grid space. | |
fr is fractional units - it establishes a ratio. | |
*/ | |
grid-template-columns: repeat(3, 33fr); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment