Skip to content

Instantly share code, notes, and snippets.

@manavm1990
Last active November 4, 2019 22:05
Show Gist options
  • Save manavm1990/055b4cc7087efa8b8559c8d0e7136de7 to your computer and use it in GitHub Desktop.
Save manavm1990/055b4cc7087efa8b8559c8d0e7136de7 to your computer and use it in GitHub Desktop.
Starter CSS for Demo SPA
/* 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