Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

support for @media print #34

Open
Eh2406 opened this issue Apr 30, 2019 · 2 comments
Open

support for @media print #34

Eh2406 opened this issue Apr 30, 2019 · 2 comments

Comments

@Eh2406
Copy link

Eh2406 commented Apr 30, 2019

Thank you for the library, it is working really well.
I was wondering if it is possible to specify what happens when my page is printed.
I have not fully thought through what the best UI would be.

@madebycaliper
Copy link

Love this library and was just working out my own Print issues. Would be great to leverage the same method for detecting the media type!

@Eh2406
Copy link
Author

Eh2406 commented May 1, 2019

Looks like the relevant line is this one witch uses json2mq. json2mq supports the screen and print queries.

We could have a sintacks like

Vue.use(VueMq, {
  breakpoints: { // default breakpoints - customize this
    sm: 450,
    md: 1250,
    lg: Infinity,
  },
  defaultBreakpoint: 'sm', // customize this for SSR
  printBreakpoint: 'print', 
})

If printBreakpoint is set then all the other queries get screen added to them, and if the print query matches then the value is used as the $mq var. If the value is one of the existing names, then it gets combined with the existing query.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants