Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support a separate print stylesheet #574

Merged
merged 4 commits into from
Mar 7, 2024
Merged

support a separate print stylesheet #574

merged 4 commits into from
Mar 7, 2024

Conversation

michaelficarra
Copy link
Member

Print styles live in css/print.css now.

src/Spec.ts Outdated
@@ -1108,10 +1115,13 @@ ${await utils.readFile(path.join(__dirname, '../js/multipage.js'))}
);
}

private addStyle(head: HTMLHeadElement, href: string) {
private addStyle(head: HTMLHeadElement, href: string, print: boolean = false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe

Suggested change
private addStyle(head: HTMLHeadElement, href: string, print: boolean = false) {
private addStyle(head: HTMLHeadElement, href: string, media?: string) {

for the sake of avoiding boolean attributes?

Copy link
Member Author

Choose a reason for hiding this comment

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

The only allowed values are all/print/screen but okay fine.

@bakkot bakkot merged commit 7d626c9 into main Mar 7, 2024
2 checks passed
@bakkot bakkot deleted the print-css branch March 7, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants