Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/site-kit/src/lib/components/Text.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
margin: 2rem 0;
/* background: var(--sk-back-3); */
@media (min-width: 767px) {
margin: 3rem 0;
}
.controls {
--height: 3.6rem;
display: flex;
Expand Down Expand Up @@ -376,7 +380,7 @@
li::before {
content: '';
position: absolute;
top: 1.43rem;
top: 1.1rem;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks bad on my screen. we will need to find some approach that works across different configurations

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed something, let me know if that works for you

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw you pushed something, how does that differ to the line-height dependent solution for you? can't we tweak the calc a bit?
FWIW I'm fine with your solution, it's already much better than what we currently have

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't work across the board for me, and I figured if everything is the same units we don't need a calc. Obviously em and lh are fungible, but the way I'm thinking of it is this: lh for spacing in typography, em for things that are tied to the size of the type itself (like icons), rem for layout. We're not being totally disciplined but I think that's a sensible way to think about things

left: -1.8rem;
background-color: var(--sk-text-4);
width: 0.6rem;
Expand Down
15 changes: 14 additions & 1 deletion packages/site-kit/src/lib/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ p,
ul,
ol {
font: var(--sk-font-body);
margin: 1lh 0;
margin: 2rem 0;

&:first-child {
margin-top: 0;
Expand All @@ -56,6 +56,15 @@ ol {
}
}

ul,
ol {
margin-top: 1rem;
}

p:has(+ ul, + ol) {
margin-bottom: 1rem;
}

a {
position: relative;
text-decoration: none;
Expand Down Expand Up @@ -139,6 +148,10 @@ blockquote {
margin: 2.4rem 0;
padding: 2rem 2.4rem 1.8rem 2.4rem;
max-width: var(--sk-page-content-width);

@media (min-width: 767px) {
margin: 4rem 0;
}
}

blockquote :where(p, ul, ol) {
Expand Down
Loading