Grapesjs: Exact size in media query

Created on 4 May 2020  路  6Comments  路  Source: artf/grapesjs

I want the changes made to the page to be displayed only when the size is selected.
Image

Most helpful comment

I used a trick and it was solved.

deviceManager.add('Extra Small', '576px', { widthMedia: '576px' }); deviceManager.add('Small', '767px', { widthMedia: '767px) and (min-width:577px' }); deviceManager.add('Medium', '991px', { widthMedia: '991px) and (min-width:768px' }); deviceManager.add('Large', '1199px', { widthMedia: '1199px) and (min-width:992px' }); deviceManager.add('Extra Large');

All 6 comments

@artf In fact I want min-width and max-width for devices selected

You can add your own devices

You can add your own devices

But it only works with the max-width

I have the same problem
please help me
Thanks

The only other option is to change the mediaCondition, you can't have both now.
If you have a better way to handle devices PRs are welcome

I used a trick and it was solved.

deviceManager.add('Extra Small', '576px', { widthMedia: '576px' }); deviceManager.add('Small', '767px', { widthMedia: '767px) and (min-width:577px' }); deviceManager.add('Medium', '991px', { widthMedia: '991px) and (min-width:768px' }); deviceManager.add('Large', '1199px', { widthMedia: '1199px) and (min-width:992px' }); deviceManager.add('Extra Large');

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tristanMatthias picture tristanMatthias  路  24Comments

fzs1994 picture fzs1994  路  15Comments

cmcintosh picture cmcintosh  路  29Comments

chrisedington picture chrisedington  路  31Comments

jujusharp picture jujusharp  路  17Comments