Issue #552💬 AnsweredOpened November 21, 2017by g41n1 reactions

Can't reset body background

Quick answerby artf1

@duskhacker I'd say it's somehow related but not the same issue. CSS you're mentioning it's generated from two different places and it's some kind of a basic CSS reset *{box-sizing: border-box;} comes from https://github.com/artf/grapesjs/blob/dev/src/editor/config/config.js#L34 and body{margin:0;} from https://github...

Read full answer below ↓

Question

I've found this

editor.CssComposer.getAll().reset();

here #351 but seems not to reset the body background...

Any other way to do this?

Answers (3)

artfNovember 29, 2017

@duskhacker I'd say it's somehow related but not the same issue. CSS you're mentioning it's generated from two different places and it's some kind of a basic CSS reset *{box-sizing: border-box;} comes from https://github.com/artf/grapesjs/blob/dev/src/editor/config/config.js#L34 and body{margin:0;}...

ryandebaNovember 22, 2017

Hi @g41n, Can you provide a jsfiddle (or equivalent) showing the issue? I just put this together which first sets the body background color to blue, and then clears that style 2 seconds later: https://jsfiddle.net/gn3jtahv/. That seems to work just fine for me (also tested using editor.CssComposer....

g41nNovember 22, 2017

Hi @ryandeba, thanks for the reply. After some digging here there is a fiddle https://jsfiddle.net/x118ks1v/ and steps to reproduce:click on the reset button, reset is successfullclick on body and change background from the panel on the rightclick on the reset button, reset failed The problem seems...

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.