LoicMahieu/react-styled-flexboxgrid

Override Media screen-only media tag

Closed this issue · 2 comments

Is there a way to override config object to not include the "screen only" restriction on the media tag? This is preventing the grid from rendering properly when trying to print in the browser.

I found the code in the config that's adding it but wasn't quite sure on how to override it.
conf.media = Object.keys(conf.breakpoints).reduce((media, breakpoint) => { const breakpointWidth = conf.breakpoints[breakpoint] media[breakpoint] = makeMedia('only screen' + (breakpoint === 0 ? '' : and (min-width: ${breakpointWidth}em))) return media }, {})

Hi @ckruszynsky

Published react-styled-flexboxgrid@2.1.0

You have now a configuration mediaType which has default only media.

Thank you for the configuration option. Much appreciated