Skip to content

Commit

Permalink
rhythm
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Oct 29, 2024
1 parent c34d737 commit d57a417
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/site-kit/src/lib/components/Text.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@
border: 1px solid var(--sk-back-5);
border-radius: var(--sk-border-radius);
overflow: hidden;
margin: 2rem 0;
margin: calc(0.5 * var(--sk-line-height-body)) 0;
/* background: var(--sk-back-3); */
@media (min-width: 767px) {
margin: 3rem 0;
margin: var(--sk-line-height-body) 0;
}
.controls {
Expand Down
4 changes: 3 additions & 1 deletion packages/site-kit/src/lib/styles/tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
--sk-font-size-ui-large: 3rem;
--sk-font-size-mono: 1.4rem;

--sk-line-height-body: 1.5;
/* doing it this way (rather than just `1.5`) means it has a unit, and can be used elsewhere */
--sk-line-height-body: calc(1.5 * var(--sk-font-size-body));
--sk-line-height-body-small: calc(1.5 * var(--sk-font-size-body-small));

--sk-font-h1: 500 var(--sk-font-size-h1) / 1.2 var(--sk-font-family-heading);
--sk-font-h2: 500 var(--sk-font-size-h2) / 1.2 var(--sk-font-family-heading);
Expand Down

0 comments on commit d57a417

Please sign in to comment.