vue-mq
vue-mq copied to clipboard
support for @media print
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.
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!
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.