Files
kredits-web/app/styles/_layout.scss

169 lines
2.6 KiB
SCSS

body {
margin-bottom: 10rem;
}
main {
padding: 1rem 2rem;
@include media-max(small) {
padding: 1rem;
}
&#dashboard {
width: 100%;
display: grid;
grid-row-gap: 2rem;
grid-template-areas:
"stats"
"contributions";
}
&#budget, &#about {
width: 100%;
display: grid;
grid-row-gap: 2rem;
grid-template-areas:
"aside"
"content";
}
&.center-column {
display: flex;
flex-direction: column;
align-items: center;
section {
width: 600px;
max-width: 100%;
header {
text-align: center;
}
}
}
div#content {
section {
&:first-of-type {
@include media-max(small) {
margin-top: 0;
}
}
}
}
section {
.content {
a {
font-size: inherit;
}
&.text-lg {
p {
font-size: 1.35rem;
margin-bottom: 2rem;
line-height: 150%;
}
}
&.text-center {
text-align: center;
}
p {
&.actions {
text-align: center;
padding-top: 2rem;
}
}
}
&.text {
h2 {
margin: 4rem 0 2rem 0;
&:first-of-type {
margin-top: 0;
}
}
p {
font-size: 1.35rem;
margin-bottom: 2rem;
line-height: 150%;
}
}
}
}
@media (min-width: 550px) {
main {
&#dashboard {
grid-column-gap: 4rem;
grid-row-gap: 2rem;
grid-template-columns: 2fr 4fr;
grid-template-areas:
"stats contributions";
&.with-details {
grid-column-gap: 3rem;
grid-template-columns: 2fr 4fr 2fr;
grid-template-areas:
"stats contributions details";
}
}
&#budget, &#about {
grid-column-gap: 3rem;
grid-template-columns: 2fr 4fr 2fr;
grid-template-areas:
"aside content empty";
}
}
}
main section {
margin-bottom: 5rem;
&:first-of-type {
margin-top: 2rem;
}
@include media-max(small) {
margin-bottom: 5rem;
}
header {
margin-bottom: 3rem;
&.with-nav {
display: grid;
grid-template-columns: auto 5rem;
grid-template-areas:
"title" "actions";
}
h2 {
display: inline-block;
// padding-left: 1.2rem;
}
nav {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
@include media-max(small) {
margin-bottom: 2rem;
}
}
// TODO Remove after switch to Tailwind CSS
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
}