Issue #2063✓ SolvedOpened Jun 3, 2019by benvmatheson3 reactions

Can I disable media queries?

Quick answerby artf3

Yes, you can use this option: https://github.com/artf/grapesjs/blob/60c1755c57da02b57988fbe0e1a0321a5395728c/src/editor/config/config.js#L90-L93

Read full answer below ↓

Question

Code SnippetTEXT
Is it possible to disable media queries?

E.g. turn this:
`@media (max-width: 331px){
  .image-block{
    position:absolute;
    top:0;
  }
  .c976{
    width:331px;
    height:526px;
    position:absolute;
  }
}`

Into this:
`.image-block{
  position:absolute;
  top:0;
}
.c976{
  width:331px;
  height:526px;
  position:absolute;
}`

Answers (3)

benvmathesonJun 13, 2019

I could remove these programmatically, but is it possible to tell grapes not to add media queries to CSS?

benvmathesonJun 17, 2019

We're needing to allow selecting device sizes while editing, but need to remove media queries. As this is a bit of an edge case, I'm assuming I should expect media queries to always be applied if in device preview mode?

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.