Skip to content

Commit

Permalink
fix: [Storybook] Improve readability of code blocks (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
meissadia committed Oct 27, 2023
1 parent e6be18e commit c0678a2
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/assets/styles/_shared.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

/** Applying DS font sizing **/
.sbdocs > p, // Custom overview page headings
.sbdocs .sbdocs-title + div p // Auto-generated page headings
.sbdocs .sbdocs-title + div p, // Auto-generated page headings
pre.prismjs // Code blocks
{
font-size: 16px;
}
Expand All @@ -38,4 +39,21 @@
* {
font-family: 'Avenir Next', Arial, sans-serif;
}

/*
Make code block plain-text readable (workaround since we can't change code highlighting theme)
https://github.com/storybookjs/storybook/issues/9641
*/
pre.prismjs {
color: white;
}
}

/*
Apply a global line-height that doesn't interfere with component Stories
that have their own line-height settings.
*/
pre.prismjs,
:where(p:not(.sb-story *, #storybook-root *)) {
line-height: 22px !important;
}

0 comments on commit c0678a2

Please sign in to comment.