Bootstrap 4 printing uses medium breakpoint
up vote
0
down vote
favorite
I recently updated some pages to be more mobile friendly, but the problem is some of our users print off pages and they print using the medium breakpoint (tablet styles) rather than desktop styles. It does this in both portrait and landscape, and it happens in both firefox and chrome
I would like pages to print using the large breakpoint but I can't figure out how.
I even already have the following set:
@media print
body
min-width: 992px !important;
Desktop sample
Print sample
sample jsfiddle:
https://jsfiddle.net/jz56frqh/2/show
html css printing bootstrap-4
add a comment |
up vote
0
down vote
favorite
I recently updated some pages to be more mobile friendly, but the problem is some of our users print off pages and they print using the medium breakpoint (tablet styles) rather than desktop styles. It does this in both portrait and landscape, and it happens in both firefox and chrome
I would like pages to print using the large breakpoint but I can't figure out how.
I even already have the following set:
@media print
body
min-width: 992px !important;
Desktop sample
Print sample
sample jsfiddle:
https://jsfiddle.net/jz56frqh/2/show
html css printing bootstrap-4
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I recently updated some pages to be more mobile friendly, but the problem is some of our users print off pages and they print using the medium breakpoint (tablet styles) rather than desktop styles. It does this in both portrait and landscape, and it happens in both firefox and chrome
I would like pages to print using the large breakpoint but I can't figure out how.
I even already have the following set:
@media print
body
min-width: 992px !important;
Desktop sample
Print sample
sample jsfiddle:
https://jsfiddle.net/jz56frqh/2/show
html css printing bootstrap-4
I recently updated some pages to be more mobile friendly, but the problem is some of our users print off pages and they print using the medium breakpoint (tablet styles) rather than desktop styles. It does this in both portrait and landscape, and it happens in both firefox and chrome
I would like pages to print using the large breakpoint but I can't figure out how.
I even already have the following set:
@media print
body
min-width: 992px !important;
Desktop sample
Print sample
sample jsfiddle:
https://jsfiddle.net/jz56frqh/2/show
html css printing bootstrap-4
html css printing bootstrap-4
edited Nov 9 at 21:40
asked Nov 9 at 20:07
Matthew Weeks
13
13
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
There are variables to change print sizing in bootstrap variables.scss:
$print-page-size: a3 !default;
$print-body-min-width: map-get($grid-breakpoints, "lg") !default;
If you want to do it manually in your CSS try this (change min-width to your desired size):
@media print
body
margin: 0;
padding: 0 !important;
min-width: 768px;
.container
width: auto;
min-width: 750px;
scss ref: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
|
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
There are variables to change print sizing in bootstrap variables.scss:
$print-page-size: a3 !default;
$print-body-min-width: map-get($grid-breakpoints, "lg") !default;
If you want to do it manually in your CSS try this (change min-width to your desired size):
@media print
body
margin: 0;
padding: 0 !important;
min-width: 768px;
.container
width: auto;
min-width: 750px;
scss ref: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
|
show 3 more comments
up vote
0
down vote
There are variables to change print sizing in bootstrap variables.scss:
$print-page-size: a3 !default;
$print-body-min-width: map-get($grid-breakpoints, "lg") !default;
If you want to do it manually in your CSS try this (change min-width to your desired size):
@media print
body
margin: 0;
padding: 0 !important;
min-width: 768px;
.container
width: auto;
min-width: 750px;
scss ref: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
|
show 3 more comments
up vote
0
down vote
up vote
0
down vote
There are variables to change print sizing in bootstrap variables.scss:
$print-page-size: a3 !default;
$print-body-min-width: map-get($grid-breakpoints, "lg") !default;
If you want to do it manually in your CSS try this (change min-width to your desired size):
@media print
body
margin: 0;
padding: 0 !important;
min-width: 768px;
.container
width: auto;
min-width: 750px;
scss ref: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
There are variables to change print sizing in bootstrap variables.scss:
$print-page-size: a3 !default;
$print-body-min-width: map-get($grid-breakpoints, "lg") !default;
If you want to do it manually in your CSS try this (change min-width to your desired size):
@media print
body
margin: 0;
padding: 0 !important;
min-width: 768px;
.container
width: auto;
min-width: 750px;
scss ref: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
answered Nov 9 at 20:21
Ali
1147
1147
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
|
show 3 more comments
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Tried this out but with 992px (as that is the minimum for large breakpoint). I've been testing it out in the print emulator, and the body is doing the minimum width, but styles are still swapping to tablet/mobile and just overflowing outside the window. They are still mobile on the print, but do not overflow
– Matthew Weeks
Nov 9 at 20:27
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
Did you change .container styles aswell? by the way it would be nice if you add a jsfiddle link of your problem.
– Ali
Nov 9 at 20:37
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
I did yes. I edited my original post to include a sample jsfiddle
– Matthew Weeks
Nov 9 at 21:41
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
Note that I had to save the iframe source on its own to test the print preview. Jsfiddle styles seem to interfere with it
– Matthew Weeks
Nov 9 at 21:51
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
have you tried changing page size? its currently set as a3 with this code: @media print @pagesize:a3
– Ali
Nov 9 at 22:33
|
show 3 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232638%2fbootstrap-4-printing-uses-medium-breakpoint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown