Skip to content

Instantly share code, notes, and snippets.

@AdamMescher
Last active January 10, 2024 22:05
Show Gist options
  • Select an option

  • Save AdamMescher/118f61f1fdc1962289c58476b454ae75 to your computer and use it in GitHub Desktop.

Select an option

Save AdamMescher/118f61f1fdc1962289c58476b454ae75 to your computer and use it in GitHub Desktop.

Revisions

  1. AdamMescher renamed this gist Apr 22, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. AdamMescher renamed this gist Apr 22, 2023. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions fluid-flow-headings.css → fluid-flow-headings-and-text.css
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,16 @@ h2 {

    h3 {
    font-size: var(--step-size-3);
    }

    p,
    li,
    blockquote:not([class]) {
    max-width: 50ch;
    }

    h1,
    h2,
    h3 {
    max-width: 20ch;
    }
  3. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 18 additions and 0 deletions.
    18 changes: 18 additions & 0 deletions fluid-flow-headings.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    h1,
    h2,
    h3 {
    line-height: 1;
    letter-spacing: var(--tracking-s);
    }

    h1 {
    font-size: var(--step-size-5);
    }

    h2 {
    font-size: var(--step-size-4);
    }

    h3 {
    font-size: var(--step-size-3);
    }
  4. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions flow-fluid-body.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    body {
    color: var(--color-dark);
    background: var(--color-light);
    font-size: var(--size-step-1);
    font-family: var(--font-base);
    line-height: 1.4;
    letter-spacing: var(--tracking);
    }
  5. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions root.css
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,16 @@
    --size-step-1: var(--utopia-type-token);
    --size-step-2: var(--utopia-type-token);
    --size-step-3: var(--utopia-type-token);

    --gutter: var(--space-s-m);

    --border-radius: var(--size-step-1);

    --transition-base: 250ms ease;
    --transition-movement: 200ms linear;
    --transition-fade: 200ms ease;
    --transition-bounce: 500ms cubic-bezier(0.5, 0.5, 0.2, 1.5);

    --tracking: -0.05ch;
    --tracking-s: -0.075ch;
    }
  6. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions root.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    :root {
    --color-primary: var(--color-theme-token);
    --color-primary-glare: var(--color-theme-token);
    --color-secondary: var(--color-theme-token);
    --color-secondary-glare: var(--color-theme-token);

    --space-s: var(--utopia-space-token);
    --space-m: var(--utopia-space-token);
    --space-l: var(--utopia-space-token);

    --size-step-1: var(--utopia-type-token);
    --size-step-2: var(--utopia-type-token);
    --size-step-3: var(--utopia-type-token);
    }
  7. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 54 additions and 0 deletions.
    54 changes: 54 additions & 0 deletions flow-fluid-baseline.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    *::before,
    *::after {
    box-sizing: border-box;
    }

    body,
    h1,
    h2,
    h3,
    h4,
    p,
    figure,
    blockquote,
    dl,
    dd {
    margin: 0;
    }

    ul[role="list"],
    ol[role="list] {
    list-style: none;
    }

    html {
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
    }

    html:focus-within {
    scroll-behavior: smooth;
    }

    body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    }

    a:not([class]) {
    text-decoration-skip-link: auto;
    }

    img,
    picture {
    max-width: 100%;
    display: block;
    }

    input,
    button,
    textarea,
    select {
    font: inherit;
    }
  8. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions flow-fluid-features.css
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,20 @@
    --flow-space: var(--space-s);

    text-align: center;
    }

    .features svg {
    display: block;
    margin-inline: auto;
    height: 4em;
    }

    .features a {
    text-decoration: none;
    }

    .features a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.08ex;
    text-decoration-underline-offset: 0.2ex;
    }
  9. AdamMescher revised this gist Apr 22, 2023. 3 changed files with 14 additions and 1 deletion.
    8 changes: 8 additions & 0 deletions flow-fluid-features.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    .features {
    --grid-placement: auto-fit;
    --grid-min-item-size: clamp(16rem, 33%, 20rem);
    --gutter: var(--space-l-xl);
    --flow-space: var(--space-s);

    text-align: center;
    }
    5 changes: 5 additions & 0 deletions flow-fluid-two-columns.css
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,9 @@
    .grid[data-layout="50-50"] {
    --grid-placement: auto-fit;
    --grid-min-item-size: clamp(16rem, 50vw, 26rem);
    }

    .grid[data-layout="masonry"] {
    grid-template-rows: masonry;
    align-items: start;
    }
    2 changes: 1 addition & 1 deletion questionably-clever.html
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    <ul class="grid" role="list">
    <ul class="grid" role="list" data-rows="masonry" data-layout="50-50">
    ...
    </ul>

  10. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions flow-fluid-card.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    .card {
    background: var(--color-dark);
    color: var(--color-light);
    padding: var(--space-m-l);
    border-radius: var(--border-radius);
    max-width: unset;
    }
  11. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions flow-fluid-two-columns.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    .grid[data-layout="50-50"] {
    --grid-placement: auto-fit;
    --grid-min-item-size: clamp(16rem, 50vw, 26rem);
    }
  12. AdamMescher revised this gist Apr 22, 2023. 2 changed files with 9 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions class-role.html
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    <ul class="grid" role="list">
    ...
    </ul>
    9 changes: 9 additions & 0 deletions questionably-clever.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <ul class="grid" role="list">
    ...
    </ul>

    <style>
    [role='list'] {
    padding: 0;
    }
    </style>
  13. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions class-role.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <ul class="grid" role="list">
    ...
    </ul>
  14. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions flow-fluid-grid.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    .grid {
    display: grid;
    grid-template-columns: repeat(
    var(--grid-placement, auto-fill),
    minmax(var(--grid-min-item-size, 16rem), 1fr)
    );
    gap: var(--gutter, var(--space-s-l));
    }
  15. AdamMescher revised this gist Apr 22, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flow-fluid-css.css
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    .flow > * + * {
    margin-top: var(--flow-space, 1em);
    margin-inline-start: var(--flow-space, 1em);
    }
  16. AdamMescher created this gist Apr 22, 2023.
    3 changes: 3 additions & 0 deletions flow-fluid-css.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    .flow > * + * {
    margin-top: var(--flow-space, 1em);
    }
    4 changes: 4 additions & 0 deletions flow-fluid-region.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    .region {
    padding-inline-start: var(--region-space, var(--space-l-2xl));
    padding-inline-end: var(--region-space, var(--space-l-2xl));
    }