Bug in WebPage Demo
Question
To reproduce:
-
Open https://grapesjs.com/demo.html in incognito mode.
-
Import this code:
<style>* {
box-sizing: border-box;
}
body {
margin: 0;
}
*{
box-sizing:border-box;
}
body{
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
margin-left:0px;
}
h2{
font-size:50px !important;
}
#bck-img7.wrapper-half-left::before{
background-image:url("/dummy.png") !important;
}
</style>
-
Clear Canvas
-
Press Import.
Result: The code is not cleared. There is thrash from the previous imported code.
Expected Result: Code should be clean.
Answers (3)
Only class-based selectors are tracked and therefore could be removed, others are left.
What about id-based selectors? grapesJS is adding them all the time. The problem can also be reproduced with just this code:
<style>* {
#bck-img7.wrapper-half-left {
background-image:url("/dummy.png") !important;
}
</style>
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.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1699
[BUG] Link elements are not copyable/deletable
In the editor, if we have link element with some classes, the editor does not allow to copy/delete the element. GrapesJS version: v0.14.50S...
Issue #3745
BUG: Can not delete background-image:url of body after an import
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chromev93 Reproducible demo link https://g...
Issue #453
Previously saved css rules not showing in Style Manager
Previously saved css rules using remote method are not showing in Style Manager. remote json response {"gjs-assets":"","gjs-css":"*{box-siz...
Issue #1812
[Bug]: 404 when trying to add background image (reproducible in demo)
Visit https://grapesjs.com/demo.html in Chrome IncognitoClick the "Header" elementClick Decorations > BackgroundDelete Layer 2Click Layer 1...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.