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

50
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "24.7.18", "version": "24.7.19",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "24.7.18", "version": "24.7.19",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/api-text": "^1.5.0", "@cdransf/api-text": "^1.5.0",
@ -131,22 +131,22 @@
} }
}, },
"node_modules/@11ty/eleventy-dev-server": { "node_modules/@11ty/eleventy-dev-server": {
"version": "2.0.3", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/@11ty/eleventy-dev-server/-/eleventy-dev-server-2.0.3.tgz", "resolved": "https://registry.npmjs.org/@11ty/eleventy-dev-server/-/eleventy-dev-server-2.0.4.tgz",
"integrity": "sha512-sJ7ZExlsyjNqOMMxJPi7ilcP7qQZdQgVYqRNnx888WINANJy/0dYQk3eGKrA6dv3ErsbncIxyWDdpwVeZjscBg==", "integrity": "sha512-d0CuufX6yPtVz+RW0oJZg1pVoxo1jOrPmpXYacoiKLJm0MMC9MkPQOCXlimguHVaceHejFo5+aZB9/aGB2RR0A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@11ty/eleventy-utils": "^1.0.3", "@11ty/eleventy-utils": "^1.0.3",
"chokidar": "^3.6.0", "chokidar": "^3.6.0",
"debug": "^4.3.6", "debug": "^4.3.7",
"dev-ip": "^1.0.1", "dev-ip": "^1.0.1",
"finalhandler": "^1.3.0", "finalhandler": "^1.3.0",
"mime": "^3.0.0", "mime": "^3.0.0",
"minimist": "^1.2.8", "minimist": "^1.2.8",
"morphdom": "^2.7.4", "morphdom": "^2.7.4",
"please-upgrade-node": "^3.2.0", "please-upgrade-node": "^3.2.0",
"send": "^0.18.0", "send": "^0.19.0",
"ssri": "^11.0.0", "ssri": "^11.0.0",
"urlpattern-polyfill": "^10.0.0", "urlpattern-polyfill": "^10.0.0",
"ws": "^8.18.0" "ws": "^8.18.0"
@ -1743,9 +1743,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.19", "version": "1.5.20",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.19.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.20.tgz",
"integrity": "sha512-kpLJJi3zxTR1U828P+LIUDZ5ohixyo68/IcYOHLqnbTPr/wdgn4i1ECvmALN9E16JPA6cvCG5UG79gVwVdEK5w==", "integrity": "sha512-74mdl6Fs1HHzK9SUX4CKFxAtAe3nUns48y79TskHNAG6fGOlLfyKA4j855x+0b5u8rWJIrlaG9tcTPstMlwjIw==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@ -1757,9 +1757,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/encodeurl": { "node_modules/encodeurl": {
"version": "1.0.2", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -1973,14 +1973,14 @@
} }
}, },
"node_modules/finalhandler": { "node_modules/finalhandler": {
"version": "1.3.0", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.0.tgz", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
"integrity": "sha512-bmwQPHFq/qiWp9CbNbCQU73klT+i5qwP/0tah3MGHp26vUt2YV4WkdtXRqOZo+H+4m38k8epFHOvO4BRuAuohw==", "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"debug": "2.6.9", "debug": "2.6.9",
"encodeurl": "~1.0.2", "encodeurl": "~2.0.0",
"escape-html": "~1.0.3", "escape-html": "~1.0.3",
"on-finished": "2.4.1", "on-finished": "2.4.1",
"parseurl": "~1.3.3", "parseurl": "~1.3.3",
@ -4311,9 +4311,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/send": { "node_modules/send": {
"version": "0.18.0", "version": "0.19.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -4352,6 +4352,16 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/send/node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/send/node_modules/mime": { "node_modules/send/node_modules/mime": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "24.7.18", "version": "24.7.19",
"description": "The source for my personal site. Built using 11ty (and other tools).", "description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -232,12 +232,52 @@ h1, h2, h3, h4, h5, h6 {
margin: var(--margin-vertical-base-horizontal-zero); margin: var(--margin-vertical-base-horizontal-zero);
} }
h1 { font-size: var(--font-size-2xl); } h1 {
h2 { font-size: var(--font-size-xl); } font-size: var(--font-size-2xl);
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); } @media screen and (min-width: 768px) {
h5 { font-size: var(--font-size-md); } font-size: var(--font-size-3xl);
h6 { font-size: var(--font-size-sm); } }
}
h2 {
font-size: var(--font-size-xl);
@media screen and (min-width: 768px) {
font-size: var(--font-size-2xl);
}
}
h3 {
font-size: var(--font-size-lg);
@media screen and (min-width: 768px) {
font-size: var(--font-size-xl);
}
}
h4 {
font-size: var(--font-size-base);
@media screen and (min-width: 768px) {
font-size: var(--font-size-lg);
}
}
h5 {
font-size: var(--font-size-md);
@media screen and (min-width: 768px) {
font-size: var(--font-size-base);
}
}
h6 {
font-size: var(--font-size-sm);
@media screen and (min-width: 768px) {
font-size: var(--font-size-md);
}
}
.section-header-wrapper { .section-header-wrapper {
justify-content: space-between; justify-content: space-between;
@ -396,6 +436,10 @@ main {
width: 80%; width: 80%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@media screen and (min-width: 768px) {
max-width: 768px;
}
} }
.status, .status,
@ -517,17 +561,4 @@ ul, ol {
.justify-centered { .justify-centered {
justify-content: center; justify-content: center;
}
@media screen and (min-width: 768px) {
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-md); }
main {
max-width: 768px;
}
} }

View file

@ -4,6 +4,10 @@
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
margin-top: var(--spacing-2xl); margin-top: var(--spacing-2xl);
@media screen and (min-width: 768px) {
grid-template-columns: repeat(4, 1fr);
}
& > * { & > * {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -21,10 +25,4 @@
& img { & img {
image-rendering: pixelated; image-rendering: pixelated;
} }
}
@media screen and (min-width: 768px) {
.badge-grid {
grid-template-columns: repeat(4, 1fr);
}
} }

View file

@ -1,6 +1,11 @@
:root { :root {
--grid-square: repeat(2, minmax(0, 1fr)); --grid-square: repeat(2, minmax(0, 1fr));
--grid-vertical: repeat(3, minmax(0, 1fr)); --grid-vertical: repeat(3, minmax(0, 1fr));
@media screen and (min-width: 768px) {
--grid-square: repeat(4, minmax(0, 1fr));
--grid-vertical: repeat(6, minmax(0, 1fr));
}
} }
.media-grid { .media-grid {
@ -99,11 +104,4 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
}
@media screen and (min-width: 768px) {
:root {
--grid-square: repeat(4, minmax(0, 1fr));
--grid-vertical: repeat(6, minmax(0, 1fr));
}
} }

View file

@ -16,6 +16,13 @@
border-radius: var(--border-radius-slight); border-radius: var(--border-radius-slight);
padding: var(--spacing-lg) var(--spacing-2xl); padding: var(--spacing-lg) var(--spacing-2xl);
@media screen and (min-width: 768px) {
max-height: 75%;
max-width: 75%;
inset: 12.5%;
border: var(--border-gray);
}
& .modal-close { & .modal-close {
position: absolute; position: absolute;
top: var(--spacing-lg); top: var(--spacing-lg);
@ -66,13 +73,4 @@
stroke: var(--accent-color-hover); stroke: var(--accent-color-hover);
} }
} }
}
@media screen and (min-width: 768px) {
.modal-wrapper .modal-body {
max-height: 75%;
max-width: 75%;
inset: 12.5%;
border: var(--border-gray);
}
} }

View file

@ -5,6 +5,10 @@
padding-left: 0; padding-left: 0;
margin-top: 0; margin-top: 0;
@media screen and (min-width: 768px) {
list-style-position: outside;
}
& li:first-of-type { & li:first-of-type {
margin-top: 0; margin-top: 0;
} }
@ -16,6 +20,12 @@
justify-content: start; justify-content: start;
align-items: start; align-items: start;
@media screen and (min-width: 768px) {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
&:not(:last-of-type) { &:not(:last-of-type) {
margin-bottom: var(--spacing-md); margin-bottom: var(--spacing-md);
} }
@ -23,6 +33,10 @@
& .progress-bar-wrapper { & .progress-bar-wrapper {
margin-top: var(--spacing-sm); margin-top: var(--spacing-sm);
max-width: 40%; max-width: 40%;
@media screen and (min-width: 768px) {
margin-left: var(--spacing-lg);
}
} }
& img { & img {
@ -30,30 +44,51 @@
border-radius: var(--border-radius-slight); border-radius: var(--border-radius-slight);
width: calc(var(--sizing-3xl) * 1.5); width: calc(var(--sizing-3xl) * 1.5);
height: calc(var(--sizing-3xl) * 1.5); height: calc(var(--sizing-3xl) * 1.5);
@media screen and (min-width: 768px) {
width: calc(var(--sizing-3xl) * 2);
height: calc(var(--sizing-3xl) * 2);
}
} }
& .presentation .info { & .presentation .info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: var(--spacing-sm); gap: var(--spacing-sm);
@media screen and (min-width: 768px) {
max-width: calc(75% - var(--sizing-lg));
}
} }
& .meta, & .meta,
& .presentation { & .presentation {
justify-content: start; justify-content: start;
gap: var(--spacing-md); gap: var(--spacing-md);
@media screen and (min-width: 768px) {
width: calc(80% - var(--sizing-lg));
}
} }
& .meta { & .meta {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@media screen and (min-width: 768px) {
width: calc(75% - var(--sizing-lg));
}
} }
& .meta-text { & .meta-text {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: start; justify-content: start;
@media screen and (min-width: 768px) {
max-width: 85%;
}
} }
& .title { & .title {
@ -76,6 +111,12 @@
& .timestamp { & .timestamp {
margin-top: var(--spacing-sm); margin-top: var(--spacing-sm);
margin-left: 0; margin-left: 0;
@media screen and (min-width: 768px) {
margin-left: var(--spacing-lg);
text-align: right;
white-space: nowrap;
}
} }
} }
@ -85,6 +126,10 @@
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
margin-bottom: var(--spacing-base); margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
grid-template-columns: repeat(3, 1fr);
}
& .item .meta { & .item .meta {
max-width: 80%; max-width: 80%;
@ -98,54 +143,4 @@
} }
} }
} }
}
@media screen and (min-width: 768px) {
.music-chart {
& ol {
list-style-position: outside;
}
& .meta,
& .presentation {
width: calc(80% - var(--sizing-lg));
}
& .item {
flex-direction: row;
align-items: center;
justify-content: space-between;
& .meta {
width: calc(75% - var(--sizing-lg));
}
& .meta-text {
max-width: 85%;
}
& .timestamp {
margin-left: var(--spacing-lg);
text-align: right;
white-space: nowrap;
}
& .info {
max-width: calc(75% - var(--sizing-lg));
}
& .progress-bar-wrapper {
margin-left: var(--spacing-lg);
}
}
&.grid {
grid-template-columns: repeat(3, 1fr);
& .item img {
width: calc(var(--sizing-3xl) * 2);
height: calc(var(--sizing-3xl) * 2);
}
}
}
} }

View file

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

View file

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

View file

@ -2,13 +2,29 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@media screen and (min-width: 768px) {
flex-direction: row;
}
& textarea { & textarea {
height: calc(var(--sizing-3xl) * 5); height: calc(var(--sizing-3xl) * 5);
resize: none; resize: none;
} }
& .column.description p:first-of-type { & .column {
margin-top: 0; @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 { h2 {
margin: 0; 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)); grid-template-columns: repeat(1, minmax(0, 1fr));
margin-bottom: var(--spacing-base); margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
& .link-box { & .link-box {
border: var(--border-gray); border: var(--border-gray);
border-radius: var(--border-radius-slight); border-radius: var(--border-radius-slight);
padding: var(--spacing-xs) var(--spacing-sm); 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%; width: 100%;
height: auto; height: auto;
aspect-ratio: var(--aspect-ratio-square); aspect-ratio: var(--aspect-ratio-square);
@media screen and (min-width: 768px) {
max-width: 240px;
}
} }
& .artist-display { & .artist-display {
@ -24,12 +28,21 @@
gap: var(--spacing-xs); gap: var(--spacing-xs);
margin-bottom: var(--spacing-base); margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
flex-direction: row;
gap: var(--spacing-md);
}
& .artist-meta { & .artist-meta {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: var(--spacing-sm); gap: var(--spacing-sm);
margin-top: var(--spacing-base); margin-top: var(--spacing-base);
@media screen and (min-width: 768px) {
margin-top: 0;
}
& p { & p {
margin: 0; margin: 0;
@ -66,21 +79,4 @@
p.concerts + ul + hr { p.concerts + ul + hr {
display: none; 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)); grid-template-columns: repeat(2, minmax(0, 1fr));
margin-bottom: var(--spacing-base); margin-bottom: var(--spacing-base);
@media screen and (min-width: 768px) {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
& a { & a {
display: flex; display: flex;
aspect-ratio: var(--aspect-ratio-banner); aspect-ratio: var(--aspect-ratio-banner);
@ -188,10 +192,4 @@ a:active > .watching.hero::after {
& .footnotes { & .footnotes {
padding-bottom: 0; padding-bottom: 0;
} }
}
@media screen and (min-width: 768px) {
.watching.grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
} }