Skip to content

Commit

Permalink
feat(design): clean up <pre> styling and add margin styles to stop ar…
Browse files Browse the repository at this point in the history
…ticle cascade (#2579)
  • Loading branch information
xelaint committed Oct 2, 2023
1 parent 37e02bd commit 540a550
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions libs/design/src/molecules/article/article/article-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
}

pre {
background: rgba(theming.daff-illuminate($base, $gray, 2), 0.3);
border: 1px solid rgba(theming.daff-illuminate($base, $gray, 2), 0.6);
background: theming.daff-illuminate($base, $gray, 1);
border: 1px solid theming.daff-illuminate($base, $gray, 2);
color: $base-contrast;

code {
Expand Down
13 changes: 8 additions & 5 deletions libs/design/src/molecules/article/article/article.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@
@include t.embolden;
}

@include stopsArticleCascade(pre) {
margin: 1.5rem 0;

&:last-child {
margin-bottom: 0;
}
}

pre {
display: block;
border-radius: 4px;
font-size: t.$small-font-size;
line-height: 1.5rem;
margin: 1.5rem 0;
padding: 1.5rem;
overflow: auto;
white-space: pre-wrap;
Expand All @@ -72,10 +79,6 @@
display: block;
padding: 0;
}

&:last-child {
margin-bottom: 0;
}
}

code {
Expand Down

0 comments on commit 540a550

Please sign in to comment.