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 a printer-oriented stylesheet #119

Closed
nodiscc opened this issue Jan 29, 2015 · 4 comments
Closed

Add a printer-oriented stylesheet #119

nodiscc opened this issue Jan 29, 2015 · 4 comments

Comments

@nodiscc
Copy link
Contributor

nodiscc commented Jan 29, 2015

It would be very nice to be able to print tasks in a "printer-friendly" way (only print tasks contents, not UI elements as it is currently; try to do a print preview on the tasks page)

I believe it can be done by defining a stylesheet specifically for printed media with eg. <link rel="stylesheet" href="print.css" type="text/css" media="print" />. The print view should only contain checkboxes and the tasks text., and aim to minimize paper loss (2 column layout?)

@raimund-schluessler are you interested in this change?

@raimund-schluessler
Copy link
Contributor

I guess this would be nice to have (although I never felt the need to print my tasks list ;). Should be relatively easy as you just said.

@nodiscc
Copy link
Contributor Author

nodiscc commented Apr 14, 2015

Adding these styles manually seems to do the trick

body {
  font-family: "Open Sans";
}

ol {
  list-style-type: circle;

}

#update-notification a, .section, #task-details, #slideshow, #header, #app-navigation, #add-task, .loadmore {
  display: none;
}

.duedate {
  color: #666;
  background-color: #EEE;
  float: left;
  font-family: "Consolas";
  padding: 0 3px 0 3px;
  margin: 0 3px 0 0;
  border-radius: 2px;
}

.overdue {
  color: #f44
}

However I'm not sure how to force printers to use this, I have to check how to use CSS Media Types http://www.w3schools.com/css/css_mediatypes.asp

@Henni
Copy link
Contributor

Henni commented Jun 2, 2015

To implement this in a clean way this must be supported by owncloud/core first.
Currently all stylesheets which are added via style('myapp', 'style'); are automatically restricted to media="screen" (<link rel="stylesheet" href="/apps/myapp/css/style.css" media="screen">).

Is there a reason for this restriction @jancborchardt or should I open an issue for this in owncloud/core?

@jancborchardt
Copy link
Member

@Henni there’s no reason for such a restriction. What we should do is to automatically check that if the file is called print.css to add it as print stylesheet. We also need this for the Mail app https://github.com/owncloud/mail/issues/717

@Henni would be cool if you can open an issue in core for that. :) Or even fix it, if you’re down for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants