Updated wrapper / base styles

This commit is contained in:
madrilene 2023-10-30 12:30:39 +01:00
parent ae726cdbe4
commit 67f50a01b1
7 changed files with 14 additions and 8 deletions

View file

@ -1,6 +1,6 @@
.prose { .prose {
--flow-space: var(--space-m-l); --flow-space: var(--space-m-l);
--wrapper-max-width: 55rem; --wrapper-width: clamp(16rem, 93vw, 55rem);
} }
.prose :is(h2, h3, h4) + * { .prose :is(h2, h3, h4) + * {

View file

@ -29,5 +29,5 @@ to change how empty grid tracks are handled */
.grid[data-layout='50-50'] { .grid[data-layout='50-50'] {
--grid-placement: auto-fit; --grid-placement: auto-fit;
--grid-min-item-size: clamp(16rem, 50vw, 26rem); --grid-min-item-size: clamp(16rem, 50vw, 28rem);
} }

View file

@ -6,11 +6,17 @@
*/ */
body { body {
color: var(--color-dark); color: var(--color-dark);
background: var(--color-light); background-color: var(--color-light);
font-size: var(--size-step-1); font-size: var(--size-step-1);
font-family: var(--font-base); font-family: var(--font-base);
line-height: 1.4; line-height: 1.4;
letter-spacing: var(--tracking); letter-spacing: var(--tracking);
display: flex;
flex-direction: column;
}
main {
flex: auto;
} }
/* Base typesetting */ /* Base typesetting */

View file

@ -6,6 +6,7 @@
--transition-movement: 200ms linear; --transition-movement: 200ms linear;
--transition-fade: 200ms ease; --transition-fade: 200ms ease;
--transition-bounce: 500ms cubic-bezier(0.5, 0.05, 0.2, 1.5); --transition-bounce: 500ms cubic-bezier(0.5, 0.05, 0.2, 1.5);
--wrapper-width: clamp(16rem, 93vw, 85rem);
--tracking: -0.05ch; --tracking: -0.05ch;
--tracking-s: -0.075ch; --tracking-s: -0.075ch;
} }

View file

@ -1,7 +1,7 @@
/* breakout content elements to wrapper based on full bleed image solution by josh cumeau. https://www.joshwcomeau.com/css/full-bleed/ */ /* breakout content elements to wrapper based on full bleed image solution by josh cumeau. https://www.joshwcomeau.com/css/full-bleed/ */
.content { .content {
--wrapper-max-width: 75rem; --wrapper-width: clamp(16rem, 93vw, 75rem);
display: grid; display: grid;
grid-template-columns: grid-template-columns:
1fr 1fr

View file

@ -5,8 +5,7 @@
* Info: https://piccalil.li/quick-tip/use-css-clamp-to-create-a-more-flexible-wrapper-utility/ * Info: https://piccalil.li/quick-tip/use-css-clamp-to-create-a-more-flexible-wrapper-utility/
*/ */
.wrapper { .wrapper {
max-inline-size: var(--wrapper-max-width, 85rem);
margin-inline: auto; margin-inline: auto;
padding-inline: var(--gutter); position: relative;
/* position: relative; */ inline-size: var(--wrapper-width, 85rem);
} }

View file

@ -7,7 +7,7 @@ date: 2022-10-12
This starter uses Eleventy's build-time image transformations. Find more info on https://www.11ty.dev/docs/plugins/image/ and edit settings in `config/shortcodes/imagePlaceholder`. This starter uses Eleventy's build-time image transformations. Find more info on https://www.11ty.dev/docs/plugins/image/ and edit settings in `config/shortcodes/imagePlaceholder`.
For now there are three image sizes: 320px, 570px and 820px. For now there are three image sizes: 320px, 570px and 820px.
820px is the maximum size, equivalent to the width set for our content wrapper in `prose.css`: `--wrapper-max-width: 55rem;`. 820px is the maximum size, equivalent to the width set for our content wrapper in `prose.css`: `--wrapper-width: clamp(16rem, 93vw, 55rem);`.
The `sizes` attribute is set to `sizes = '(min-width: 55rem) 820px, 100vw'`. The `sizes` attribute is set to `sizes = '(min-width: 55rem) 820px, 100vw'`.