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

Bootstrap styling for printed pages #99

Open
ch0wnag3 opened this issue Feb 25, 2014 · 2 comments
Open

Bootstrap styling for printed pages #99

ch0wnag3 opened this issue Feb 25, 2014 · 2 comments

Comments

@ch0wnag3
Copy link

I noticed that printed pages within my app were rather ugly and I stumbled across this:

http://stackoverflow.com/questions/12302819/how-to-create-a-printable-twitter-bootstrap-page

Using the answer there as a guide, I added tweaked my layout like so:

<r:require modules="bootstrap"/>
<!-- This is what I added -->
<link href="/myApp/static/bundle-bundle_bootstrap_head.css" type="text/css" rel="stylesheet" media="print" />

This feels like a very hacky solution. I've read over the documentation and couldn't find anything that addresses the problem.

@buzzsawddog
Copy link

I can confirm that the problem is there.

<link href="/SomeProject/static/bundle-bundle_bootstrap_head.css" type="text/css" rel="stylesheet" media="screen, projection">

is what is generated and... it does not include the print version.

@ocomsoft
Copy link
Collaborator

The following needs to change in conf/BootstrapResources.groovy:42

resource id: 'bootstrap-css', url:[plugin: 'twitter-bootstrap', dir: 'css', file: (dev ? cssFile : cssminFile)], disposition: 'head', exclude:'minify' , attrs:[media:'screen, projection, print']

Added in
, attrs:[media:'screen, projection, print']

This will break bundling.

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

No branches or pull requests

3 participants