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

Add printing style sheet, enables printing of text files #2867

Merged
merged 3 commits into from
Sep 13, 2022

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 6, 2022

Summary

Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders (they are quite hard to read without on paper).

This implements the CSS part of #112

@susnux susnux added enhancement New feature or request design Experience, interaction, interface, … 3. to review labels Sep 6, 2022
css/print.scss Outdated Show resolved Hide resolved
@susnux susnux force-pushed the feat/print_css branch 3 times, most recently from 0eddead to cd0a041 Compare September 8, 2022 12:58
@susnux
Copy link
Contributor Author

susnux commented Sep 8, 2022

I had to add the rule for hiding the content behind the modal as an event listener to prevent hiding the content if the editor was loaded for rich workspace.
So this should now work for all cases.

@vinicius73
Copy link
Member

vinicius73 commented Sep 8, 2022

Looks good @susnux

But only the "first page" is printable.

print.mp4

Is this expected?

File used into this test:

demo.md

Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux
Copy link
Contributor Author

susnux commented Sep 12, 2022

@vinicius73

But only the "first page" is printable.
Is this expected?

No, this happened because the body was set to position: fixed and overflow: hidden. Added a rule to fix this.

Copy link
Member

@vinicius73 vinicius73 left a comment

Choose a reason for hiding this comment

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

Looks awesome.

Peek.2022-09-12.20-36.mp4

@vinicius73
Copy link
Member

/compile

@vinicius73 vinicius73 added this to the Nextcloud 25 milestone Sep 12, 2022
Signed-off-by: nextcloud-command <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review design Experience, interaction, interface, … enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support printing notes (first print CSS, then export to PDF)
3 participants