Skip to content

Commit

Permalink
Reorganise print.css slightly to group related styles and add a coupl…
Browse files Browse the repository at this point in the history
…e comments
  • Loading branch information
delucis committed Jan 9, 2025
1 parent 9b9934f commit 8b368d9
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions packages/starlight/style/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
--sl-shadow-lg: none;
}

/* Utility classes for controlling element visibility when printing. */
.print\:hidden {
display: none !important;
}
Expand All @@ -63,7 +64,7 @@
display: block !important;
}

/* index.astro */
/* Page layout tweaks. */
main {
padding-bottom: 0 !important;
}
Expand All @@ -73,6 +74,19 @@
.content-panel + .content-panel {
border: 0 !important;
}
/* layout/PageFrame.astro */
.page > header {
position: relative !important;
}
.page > .main-frame {
padding-top: 0;
padding-inline-start: 0;
}
/* layout/TwoColumnContent.astro */
.main-pane {
--sl-sidebar-width: 0px !important;
--sl-content-width: 100% !important;
}

/* components/MarkdownContent.astro */
.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) {
Expand All @@ -82,15 +96,13 @@
orphans: 2;
widows: 2;
}

.sl-markdown-content pre {
overflow-x: hidden !important;
white-space: pre-wrap !important;
}
.sl-markdown-content .expressive-code {
break-inside: avoid;
}

/* Inline code */
.sl-markdown-content code:not(:where(.not-content *)) {
background-color: transparent !important;
Expand Down Expand Up @@ -125,19 +137,4 @@
starlight-tabs {
break-inside: avoid;
}

/* layout/PageFrame.astro */
.page > header {
position: relative !important;
}
.page > .main-frame {
padding-top: 0;
padding-inline-start: 0;
}

/* layout/TwoColumnContent.astro */
.main-pane {
--sl-sidebar-width: 0px !important;
--sl-content-width: 100% !important;
}
}

0 comments on commit 8b368d9

Please sign in to comment.