leilukin-site/src/assets/css/content.css

83 lines
1.4 KiB
CSS
Raw Normal View History

2024-05-17 18:49:53 +00:00
/* MAIN CONTENT */
.content__wrapper,
.content--divided {
display: grid;
}
.content__wrapper,
.content--divided {
gap: 1rem;
}
.content__wrapper {
justify-self: center;
}
.content:not(.content--divided),
.content__section {
padding: 1.5rem var(--sz-main-padding);
}
.main__header {
padding: 2.5rem var(--sz-main-padding);
text-align: center;
display: grid;
}
.content:not(.content--divided),
.content__section {
background-color: var(--clr-content-bg);
}
.article__info {
text-align: center;
display: grid;
gap: 0.2em;
}
.content > * + .h2,
2024-06-06 11:22:08 +00:00
.content__section > * + .h2 {
2024-05-17 18:49:53 +00:00
margin-top: 2em;
}
.content > * + :not([class]),
2024-06-06 11:22:08 +00:00
.content__section > * + :not([class]) {
2024-05-17 18:49:53 +00:00
margin-top: var(--sz-paragraph-margin);
}
.content ul:not([class]), .content ol:not([class]) {
display: grid;
gap: 0.7em;
}
.content ul ul, .content ol ol,
.content ul ol, .content ol ul {
margin-top: 0.7em;
}
2024-05-17 18:49:53 +00:00
.sidebar--sticky {
position: sticky;
top: 4rem;
}
/* Desktop main content layout */
@media only screen and (min-width: 60rem) {
.content__wrapper {
padding: 0 var(--sz-main-padding);
2024-06-06 11:22:08 +00:00
grid-template-areas: 'leftbar content rightbar';
2024-05-17 18:49:53 +00:00
grid-template-columns: minmax(0, 20%) minmax(0, 2.5fr) minmax(0, 20%);
}
.content {
2024-06-06 11:22:08 +00:00
grid-area: content;
2024-05-17 18:49:53 +00:00
}
.left-sidebar {
grid-area: leftbar;
}
.right-sidebar {
grid-area: rightbar;
}
}