Print stylesheet #1160
trueberryless
started this conversation in
Feature Requests
Replies: 2 comments 2 replies
-
This should be doable by shipping a print style sheet. If it's a common use-case for you, you can also already use custom CSS and a media query to target print. For example, if I try to print right now the default template, I get something similar to your screenshot: Using this custom CSS: @media print {
.header,
#starlight__sidebar,
.right-sidebar-container,
footer {
display: none;
}
.main-frame {
padding-inline-start: 0;
padding-top: 0;
}
.main-pane {
width: 100%;
--sl-content-margin-inline: unset;
}
.sl-container {
--sl-content-width: 100%;
}
} I get this: |
Beta Was this translation helpful? Give feedback.
1 reply
-
We did actually already work on print styles at one point in the past: #157 The issue then was including them in a way that they don‘t download until needed, but would be happy to revisit that if people are interested. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.13.0
What is your idea?
I don't know if it is possible to implement but it would be great to have the option to print one page at a time.
Windows supports printing webpages out of the box but it looks kinda awkward:
It would be great if the Windows integrated print option would be overriden to print only the headings and text without the webpage layout...
Why is this feature necessary?
It is just nice to have.
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions