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

Print oriented CSS for articles/discourse #40

Open
paperdigits opened this issue Dec 2, 2016 · 12 comments
Open

Print oriented CSS for articles/discourse #40

paperdigits opened this issue Dec 2, 2016 · 12 comments

Comments

@paperdigits
Copy link
Contributor

I just started getting into the CSS paged media spec at work, and man I think it is awesome. As a coinsidence, I saw this comment about discourse not printing well (though that may be an IE issue).

Are you interested in trying to have a print style sheet for articles on the site and possibly for discourse?

@patdavid
Copy link
Member

patdavid commented Dec 2, 2016

I would have sworn that I did have print styles defined, but wouldn't be surprised if I was just insane. :)

Yes. This would be a good idea. I had something in mind once upon a time, but we can revisit and start from scratch too.

@paperdigits
Copy link
Contributor Author

If you can find what you had, point me to it, otherwise I can start hacking at it!

@patdavid
Copy link
Member

patdavid commented Dec 2, 2016

I'd say hack at it! (Don't forget to grab a clean version of the repo - I nuked some big binary blobs a little while back and don't want them polluting the commit chain again).

I was thinking along the lines of...

  • Remove the lede image? (Or maybe this should be kept?
  • Fix the column width?
  • Fix the typography size?
  • Change anchor element visual cue (underline?)

The last two are mainly to keep the cpl to around 70-80 if possible (assuming we're targeting A4/8.5x10 roughly for page sizes.

@paperdigits
Copy link
Contributor Author

Yes to all of your points, except I don't understand what you mean by "Change the anchor element visual cue."

@patdavid
Copy link
Member

patdavid commented Dec 2, 2016

Change the anchor element visual cue.

Just wondering if there were any reason to possibly offset links in the printed version? If so, I'd change links to use an underline (vs. a different color). But honestly, this is so far down the list of important things. :)

Oh, I'd probably lose all of the stuff in the footer (or at least change up the styling to be unobtrusive - of course I'm probably preaching to the choir here... :) ).

@paperdigits
Copy link
Contributor Author

Oh yeah, I see. Actually I was going to add some code to print the URL after the link text, because if you actually print it (not just print to PDF), the knowing that the text is a link doesn't do you any good. You need to know the actual URL.

I'm way down the rabbit hole on this at work, so I'll see what I can put together.

@paperdigits
Copy link
Contributor Author

I did a little hacking if you want to check it out: https://github.com/paperdigits/website/tree/print-style

There is something funny that is making the paragraphs wrap a bit funny. I'm not sure what that is.

@patdavid
Copy link
Member

patdavid commented Dec 3, 2016

I'll have a look a little later!

@patdavid
Copy link
Member

patdavid commented Dec 5, 2016

Looks like a great start (and neat method for getting the url printed on links - I like it +I learned something tonight!). :)

I've got to finish pushing a post about the digital painters, but I'll jump in and help soon. The print version now has a similar problem I've been meaning to address with the overall page layouts. I'd like to center the column overall, and probably push the width just a bit more.

Do you think a printed page should go full width of the page with the text? I feel like it probably should, but would want to see/test a couple of things (lists, short paragraphs, etc..) along with fixing some margin issues.

@paperdigits
Copy link
Contributor Author

paperdigits commented Dec 5, 2016 via email

@patdavid
Copy link
Member

patdavid commented Dec 5, 2016

Is there a reason you didn't use a framework like bootstrap or foundation?

Not particularly. They weren't offering me anything I couldn't do myself reasonably, and I generally prefer to build up as needed vs. pulling in everything. Plus I like playing. :)

@paperdigits
Copy link
Contributor Author

paperdigits commented Dec 28, 2016

I've pushed the one file, print.scss into the style folder on the branch print-style. It isn't linked to in style.scss yet.

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

2 participants