diff --git a/src/components/MediaGallery/MediaGallery.module.scss b/src/components/MediaGallery/MediaGallery.module.scss index dc9430b..885ab9e 100644 --- a/src/components/MediaGallery/MediaGallery.module.scss +++ b/src/components/MediaGallery/MediaGallery.module.scss @@ -1,3 +1,8 @@ +// +// Media Gallery +// Gallery component styles, including gallery item styles and caption styles. +// + .root :global { margin-bottom: 3rem; @@ -5,21 +10,6 @@ position: relative; margin-top: 3rem; overflow: hidden; - } - .gallery-caption { - margin-top: 0.5rem; - color: var(--colors-loContrast); - } -} - -.root { - &:global(.media-gallery) { - margin-bottom: 1.75rem; - } -} - -.root :global { - .gallery-container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; @@ -29,8 +19,14 @@ position: relative; overflow: hidden; border-radius: var(--radii-1); + background-color: var(--colors-panel); box-shadow: 0 1px 2px var(--colors-shadowDark); + &:first-child { + grid-column: 1 / 6; + grid-row: 1; + } + &::after { position: absolute; top: 0; @@ -43,10 +39,10 @@ box-shadow: inset 0 0 0 1px var(--colors-shadowMedia); } } + } - > .gallery-item-container:first-child { - grid-column: 1 / 6; - grid-row: 1; - } + .gallery-caption { + margin-top: 0.5rem; + color: var(--colors-loContrast); } } diff --git a/src/styles/globals.css b/src/styles/globals.css index 2f4984c..5c6a1ce 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -2,8 +2,10 @@ :root { --max-width: 1100px; - --font-sans: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; - --mono-sans: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', + Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; + --mono-sans: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, + Liberation Mono, monospace; --colors-hiContrast: #1a1523; --colors-loContrast: #6f6e77; @@ -30,7 +32,7 @@ --colors-hiContrast: #ededef; --colors-canvas: #161618; --colors-panel: hsla(240, 76.7%, 91.2%, 0.031); - --colors-border: hsla(240, 86.0%, 95.8%, 0.061); + --colors-border: hsla(240, 86%, 95.8%, 0.061); --colors-shadowMedia: hsla(240, 93.9%, 99.6%, 0.25); --colors-pill: hsla(0, 0%, 100%, 0.11); } @@ -38,7 +40,9 @@ /* custom reset */ -*, *::before, *::after { +*, +*::before, +*::after { box-sizing: border-box; } @@ -60,21 +64,36 @@ body { -moz-osx-font-smoothing: grayscale; } -img, picture, video, canvas, svg { +img, +picture, +video, +canvas, +svg { display: block; max-width: 100%; } -input, button, textarea, select { +input, +button, +textarea, +select { font: inherit; } -tt, code, samp { +tt, +code, +samp { font-family: var(--mono-sans); font-size: 12px; } -p, h1, h2, h3, h4, h5, h6 { +p, +h1, +h2, +h3, +h4, +h5, +h6 { overflow-wrap: break-word; } @@ -83,7 +102,8 @@ a { text-decoration: none; } -#root, #__next { +#root, +#__next { isolation: isolate; }