Issue #2843πŸ’¬ AnsweredOpened June 19, 2020by abozhinov0 reactions

Can't remove style property on selected device

Quick answerby abozhinov

@artf do you have idea how can i fix it?

Read full answer below ↓

Question

Hi, have a problem with removing style property on selected device (clearProperties: true). You can reproduce the problem on https://grapesjs.com/demo.html. Steps:Clean everything.Drag custom code.Add this sample code.Switch devices to tablet or mobile and select the component.In the Typography style you can see that the COLOR property is YELLOW and there is NO clean icon. I have X icon only on desktop device but on mobile or tablet is just yellow label.

Answers (3)

abozhinovβ€’ June 23, 2020

@artf do you have idea how can i fix it?

artfβ€’ July 1, 2020

To make the StyleManager read the proper style rule your media query should reflect the same width of the selected Device. Did you try it?

abozhinovβ€’ July 1, 2020

Yes I do it. deviceManager: { devices: [ { name: 'Desktop', width: '', priority: 3 }, { name: 'Tablet', width: '768px', widthMedia: '991px', priority: 2 }, { name: 'Mobile', width: '360px', height: '640px', widthMedia: '767px', priority: 1 }] },

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.