chore: group media queries with rules

This commit is contained in:
Cory Dransfeldt 2024-09-11 15:21:40 -07:00
parent 6d82c73e2d
commit b178203a09
No known key found for this signature in database
13 changed files with 219 additions and 197 deletions

View file

@ -1,5 +1,9 @@
:root {
--avatar-size: 16rem;
@media screen and (min-width: 768px) {
--avatar-size: 24rem;
}
}
.avatar-wrapper {
@ -16,10 +20,4 @@
image-rendering: pixelated;
}
}
}
@media screen and (min-width: 768px) {
:root {
--avatar-size: 24rem;
}
}

View file

@ -4,6 +4,12 @@
align-items: center;
gap: var(--spacing-sm);
@media screen and (min-width: 768px) {
flex-direction: row;
gap: var(--spacing-base);
align-items: start;
}
&:last-of-type {
border-bottom: 0;
margin-bottom: 0;
@ -39,6 +45,10 @@
& .book-meta {
align-items: center;
@media screen and (min-width: 768px) {
align-items: start;
}
& p {
margin: 0;
overflow: hidden;
@ -47,9 +57,20 @@
width: fit-content;
}
& .description {
@media screen and (min-width: 768px) {
margin-bottom: var(--spacing-base);
}
}
& .progress-bar-wrapper {
max-width: 75%;
margin-bottom: 0;
@media screen and (min-width: 768px) {
margin-top: 0;
max-width: 50%;
}
}
}
}
@ -100,51 +121,30 @@
gap: var(--spacing-base);
margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
flex-direction: row;
align-items: start;
}
& .book-meta {
width: 100%;
align-items: center;
@media screen and (min-width: 768px) {
width: auto;
align-items: start;
}
& p {
margin: 0;
}
& .progress-bar-wrapper {
max-width: 50%;
}
}
}
}
@media screen and (min-width: 768px) {
.book-entry {
flex-direction: row;
gap: var(--spacing-base);
align-items: start;
& .book-meta {
align-items: start;
& .progress-bar-wrapper {
margin-top: 0;
max-width: 50%;
}
& .description {
margin-bottom: var(--spacing-base);
}
}
}
.book-focus .book-display {
flex-direction: row;
align-items: start;
& .book-meta {
width: auto;
align-items: start;
& .progress-bar-wrapper {
max-width: none;
@media screen and (min-width: 768px) {
max-width: none;
}
}
}
}

View file

@ -2,13 +2,29 @@
display: flex;
flex-direction: column;
@media screen and (min-width: 768px) {
flex-direction: row;
}
& textarea {
height: calc(var(--sizing-3xl) * 5);
resize: none;
}
& .column.description p:first-of-type {
margin-top: 0;
& .column {
@media screen and (min-width: 768px) {
width: 50%;
}
&.description {
& p:first-of-type {
margin-top: 0;
}
@media screen and (min-width: 768px) {
padding-right: var(--spacing-xl);
}
}
}
}
@ -22,18 +38,4 @@
h2 {
margin: 0;
}
}
@media screen and (min-width: 768px) {
.contact-wrapper {
flex-direction: row;
& .column {
width: 50%;
}
& .column.description {
padding-right: var(--spacing-xl);
}
}
}

View file

@ -4,15 +4,13 @@
grid-template-columns: repeat(1, minmax(0, 1fr));
margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
& .link-box {
border: var(--border-gray);
border-radius: var(--border-radius-slight);
padding: var(--spacing-xs) var(--spacing-sm);
}
}
@media screen and (min-width: 768px) {
.link-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

View file

@ -16,6 +16,10 @@
width: 100%;
height: auto;
aspect-ratio: var(--aspect-ratio-square);
@media screen and (min-width: 768px) {
max-width: 240px;
}
}
& .artist-display {
@ -24,12 +28,21 @@
gap: var(--spacing-xs);
margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
flex-direction: row;
gap: var(--spacing-md);
}
& .artist-meta {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
margin-top: var(--spacing-base);
@media screen and (min-width: 768px) {
margin-top: 0;
}
& p {
margin: 0;
@ -66,21 +79,4 @@
p.concerts + ul + hr {
display: none;
}
@media screen and (min-width: 768px) {
.artist-focus {
& img {
max-width: 240px;
}
& .artist-display {
flex-direction: row;
gap: var(--spacing-md);
& .artist-meta {
margin-top: 0;
}
}
}
}

View file

@ -75,6 +75,10 @@ a:active > .watching.hero::after {
grid-template-columns: repeat(2, minmax(0, 1fr));
margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
& a {
display: flex;
aspect-ratio: var(--aspect-ratio-banner);
@ -188,10 +192,4 @@ a:active > .watching.hero::after {
& .footnotes {
padding-bottom: 0;
}
}
@media screen and (min-width: 768px) {
.watching.grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}