Refactor post styling code
This commit is contained in:
parent
278f5a8390
commit
f46ca670fe
2 changed files with 145 additions and 1 deletions
|
@ -0,0 +1,110 @@
|
|||
:root {
|
||||
font-family: "Open Sans", sans-serif, serif;
|
||||
/* Variables */
|
||||
--content-width: 60rem;
|
||||
--header-width: 35rem;
|
||||
--box-padding-vert: 1rem;
|
||||
--box-padding-horz: 1rem;
|
||||
--box-margin-vert: 0.5rem;
|
||||
--box-margin-horz: 1rem;
|
||||
--box-gap: 0.5rem;
|
||||
--box-radius: 1rem;
|
||||
}
|
||||
|
||||
/* Main Body and Post Flexboxs */
|
||||
body, .post {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--box-gap);
|
||||
}
|
||||
|
||||
/* Style the site header */
|
||||
.site-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
max-width: var(--header-width);
|
||||
padding: var(--box-padding-vert) var(--box-padding-horz);
|
||||
border-radius: var(--box-radius);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.site-logo {
|
||||
font-size: 2.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.site-tagline {
|
||||
font-size: 0.9rem;
|
||||
font-style: italic;
|
||||
}
|
||||
.header-links {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--box-gap);
|
||||
font-size: 1.1rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: var(--box-margin-vert);
|
||||
}
|
||||
.header-links > a > span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.header-links > a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
/* Style the post header, body, and blurbs */
|
||||
/* TODO: Style footnotes and get footnote hover working */
|
||||
.post-header, .post-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--box-gap);
|
||||
width: 100%;
|
||||
max-width: var(--content-width);
|
||||
padding: var(--box-padding-vert) var(--box-padding-horz);
|
||||
margin: var(--box-margin-vert) var(--box-margin-horz);
|
||||
border-radius: var(--box-radius);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.post-title > h1 {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.post-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--box-gap);
|
||||
font-size: 0.9rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.post-read-time {
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
.post-body > h3, .post-body > h3, .post-body > h4 {
|
||||
text-align: center;
|
||||
}
|
||||
.post-blurbs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--box-gap);
|
||||
width: 100%;
|
||||
max-width: var(--content-width);
|
||||
padding: var(--box-padding-vert) var(--box-padding-horz);
|
||||
border-radius: var(--box-radius);
|
||||
}
|
||||
.post-blurb {
|
||||
width: 100%;
|
||||
display: block;
|
||||
border-radius: var(--box-radius);
|
||||
padding: var(--box-padding-vert) var(--box-padding-horz);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue