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

Can I disable media queries?

快速解答by 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

代码片段TEXT
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)

benvmathesonJune 13, 2019

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

benvmathesonJune 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.