vue-mq icon indicating copy to clipboard operation
vue-mq copied to clipboard

support for @media print

Open Eh2406 opened this issue 6 years ago • 2 comments

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.

Eh2406 avatar Apr 30 '19 16:04 Eh2406

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!

madebycaliper avatar May 01 '19 01:05 madebycaliper

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.

Eh2406 avatar May 01 '19 14:05 Eh2406