Skip to content

Conversation

Mister-Hope
Copy link
Member

No description provided.

@Mister-Hope
Copy link
Member Author

Before:
image

After:

image

@Mister-Hope Mister-Hope requested a review from meteorlxy December 5, 2022 06:18
@Mister-Hope Mister-Hope changed the title feat: improve print style for plugins feat: improve print style Dec 5, 2022
Copy link
Member

@meteorlxy meteorlxy left a comment

Choose a reason for hiding this comment

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

I think we should put all print-related styles together in a same file or in a same section of their corresponding style file.

What about just adding a print.scss file in default theme? This might be more related to theme than those plugins.

@Mister-Hope
Copy link
Member Author

Mister-Hope commented Dec 5, 2022

I think we should put all print-related styles together in a same file or in a same section of their corresponding style file.

What about just adding a print.scss file in default theme? This might be more related to theme than those plugins.

I do think that some styles are much more reasonable inside a plugin, e.g.: in all cases users shall not print a "search box"😂 so does a back-to-top plugin and a pwa pop up.

Moreover, since users are printing pdf, all links are "external"

So my central point is it's totally reasonable for the plugin print style to be like that all times.

If users do in rare case disagree with them, they shall override them

@Mister-Hope
Copy link
Member Author

Also a toggleDarkmode button should also be hidden under all situations, and so does a edit link towards a pdf.

In my own theme I did plenty of customization for print style, but for the modification in this pr, I do think they are necessary in 99% situations. So I think adding them inside styles controlling the component would be fine.

The only exception should be anchor links, as heading anchor (the # before heading are hidden, and links are inserted through after)

@meteorlxy meteorlxy merged commit 0800a07 into main Dec 8, 2022
@meteorlxy meteorlxy deleted the print-style branch December 8, 2022 09:46
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