Issue #1333Opened August 1, 2018by kripper0 reactions

Bug in WebPage Demo

Question

To reproduce:

  1. Open https://grapesjs.com/demo.html in incognito mode.

  2. 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>
  1. Clear Canvas

  2. Press Import.

Result: The code is not cleared. There is thrash from the previous imported code.

Expected Result: Code should be clean.

Answers (3)

artfAugust 2, 20180 reactions

Only class-based selectors are tracked and therefore could be removed, others are left.

kripperAugust 2, 20180 reactions

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>
lock[bot]September 17, 20190 reactions

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.

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

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.