matrix.org/sass/_blog.scss

199 lines
3.9 KiB
SCSS

article.post {
width: 100%;
word-break: break-word;
h2:first-of-type {
margin-block-start: 0;
}
&:not(:last-of-type) {
padding-bottom: 1rem;
margin-bottom: 2.5rem;
border-bottom: 2px solid #ddd;
}
&:last-of-type {
margin-bottom: 1.5rem;
}
table {
table-layout: fixed;
border-spacing: 0;
th {
border-top: 1px solid var(--borders-color);
}
td,
th {
padding: .5rem;
border-bottom: 1px solid var(--borders-color);
}
td:first-of-type,
th:first-of-type {
border-left: 1px solid var(--borders-color);
}
td:last-of-type,
th:last-of-type {
border-right: 1px solid var(--borders-color);
}
th:first-of-type {
border-top-left-radius: 16px;
}
th:last-of-type {
border-top-right-radius: 16px;
}
tbody tr:last-of-type {
td:first-of-type {
border-bottom-left-radius: 16px;
}
td:last-of-type {
border-bottom-right-radius: 16px;
}
}
tr:nth-child(odd) td {
background-color: #eee;
}
}
blockquote {
margin: 0 0 10px 0;
padding: 10px 20px;
border-left: 5px solid #E2E2E2;
}
header {
margin-bottom: 1rem;
}
}
.post-main {
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
align-self: center;
.callout {
display: grid;
grid-template-columns: 300px auto;
color: #fff;
background-color: #000;
border-radius: 16px;
@media (max-width: 767px) {
grid-template-columns: auto;
grid-template-rows: 10rem auto;
}
.left-col {
display: grid;
place-content: center;
background-image: url("/assets/mandala.svg");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
h2 {
margin: 2rem;
text-align: center;
}
}
.right-col {
padding: 2rem;
}
a {
color: rgba(34, 109, 227);
}
.call-to-action {
display: inline-block;
font-size: 1.125rem;
font-weight: 700;
background-color: rgba(34, 109, 227);
padding: .5rem 1.5rem;
border-radius: 9999px;
color: #fff;
margin-block-start: 1rem;
}
.call-to-action:hover {
background-color: #fff;
color: rgba(34, 109, 227);
}
}
aside {
@media (max-width: 1023px) {
display: none;
}
a {
color: rgb(51, 51, 51);
&:hover {
color: rgb(0, 152, 212);
}
}
&>:first-child {
margin-top: 0;
}
&>ul>li:not(:last-child) {
margin-bottom: .5rem;
}
flex: 1 1;
max-width: 320px;
margin-left: 4rem;
padding: 1.5rem;
background-color: #f4f4f4;
}
}
.post-content {
// Use all of the space not taken by the sidebar
flex: 3;
// Necessary to allow the pre to scroll on overflow
min-width: 0;
blockquote {
h2 {
font-size: 1.5rem;
}
h3 {
font-size: 1.2rem;
}
h4 {
font-size: 1.1rem;
font-style: italic;
}
}
}
#continue-reading {
// scroll a bit further down so the header doesn't obstruct the content that was scrolled to
scroll-margin-top: 60px;
}
h3 a {
color: var(--color-link);
}
.footnote-definition>p {
display: inline;
}