Skip to content

Commit d57a417

Browse files
committed
rhythm
1 parent c34d737 commit d57a417

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/site-kit/src/lib/components/Text.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@
116116
border: 1px solid var(--sk-back-5);
117117
border-radius: var(--sk-border-radius);
118118
overflow: hidden;
119-
margin: 2rem 0;
119+
margin: calc(0.5 * var(--sk-line-height-body)) 0;
120120
/* background: var(--sk-back-3); */
121121
122122
@media (min-width: 767px) {
123-
margin: 3rem 0;
123+
margin: var(--sk-line-height-body) 0;
124124
}
125125
126126
.controls {

packages/site-kit/src/lib/styles/tokens.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
--sk-font-size-ui-large: 3rem;
4040
--sk-font-size-mono: 1.4rem;
4141

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

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

0 commit comments

Comments
 (0)