question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't reset body background

See original GitHub issue

I’ve found this

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

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

Any other way to do this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
artfcommented, Nov 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;} from https://github.com/artf/grapesjs/blob/dev/src/dom_components/config/config.js#L10

Probably what I’ll gonna do for the next release is to move the current wrapper style inside protectedCss option. For those who are trying to achieve edit the CSS directly with the code editor should add a new view code command (current) and replace em.getCss() with em.getCss({ avoidProtected: 1 }) (not yet implemented)

0reactions
lock[bot]commented, Nov 9, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't change body background color using CSS reset
Your CSS reset file sets the background color of html which is the entire page. You are only setting the body 's background...
Read more >
I can't change the body background-color through style.css
This works for everything but body. I should be more clear: it changed the body background color until I messed with the background...
Read more >
HTML DOM Style background Property - W3Schools
The background property sets or returns up to eight separate background properties, in a shorthand form. ... The properties above can also be...
Read more >
Using multiple backgrounds - CSS: Cascading Style Sheets
You can apply multiple backgrounds to elements. These are layered atop one another with the first background you provide on top and the...
Read more >
Change a message background - Microsoft Support
Give messages a professional look when you change the default white background. Whether you select a different background color or go for more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found