Comments (3)
it is intended to store canvas styles, styles that do not affect the result of hmtl/css, styles that will not be exported, right?
Correct
by default the body has a white background, this seems to be the default color in all browsers, no?
yeah but the iframe
body doesn't have any default background color that's why that style is there, so you'll need to figure it something for your use case.
from grapesjs.
There is canvasCss option for that.
Next time open a Discussion please, as this is not a core bug but wrong usage.
from grapesjs.
Hey @artf. Thanks for the answer. I'm not sure that we understood each other and I would like to clarify one detail.
Yes, I know about the canvasCss property, moreover, I use it to change the styles of the selected component. I understand the essence of the property: it is intended to store canvas styles, styles that do not affect the result of hmtl/css, styles that will not be exported, right?
Then why do the default canvas styles have this CSS rule body { background-color: white; }
? And why it makes sense us to override it?
I understand the case where the body element is selected, in which case it makes sense to apply some styles to the body for interactivity.
But why specify body {background-color: white; }
by default, it doesnโt affect the interactivity of the editor?
Moreover, by default the body has a white background, this seems to be the default color in all browsers, no?
This is kind of unexpected behavior that requires me to apply !important
to my exported style so that I can override the styles from canvasCss.
from grapesjs.
Related Issues (20)
- Interested in Collaboration?
- BUG: Double Entry in Layers if Component is moved directly after add HOT 1
- BUG:
- event works also on component mount HOT 1
- BUG: Uncaught TypeError: __webpack_require__.r is not a function at ./node_modules/grapesjs/dist/grapes.mjs (grapes.mjs:1:1) at __webpack_require__ (bootstrap:789:1) at fn (bootstrap:150:1) at ./src/Demo/Templates/TextEditor.js (Templates.js:31:1) at __webpack_require__ (bootstrap:789:1) at fn (bootstrap:150:1) at ./src/Demo/Templates/Templates.js (Templates.css:45:1) at __webpack_require__ (bootstrap:789:1) at fn (bootstrap:150:1) HOT 2
- When rendering <tr> tags inside <template> tags, tags are trimmed off and only string content is remained.
- Icons and Shapes options HOT 1
- BUG: ID isn't updating after change
- BUG: on fullscreen, color picker is hidden HOT 2
- BUG: Cannot edit component content even with editable property set to true HOT 1
- Installation of Grapesjs and yarn on Ubuntu 24.04 LTS HOT 1
- BUG: Broken link on Asset Manager
- BUG: Unable to open component settings again, after clicking component and then clicking Blocks HOT 1
- BUG: SVG containing mask and image doesn't render correctly HOT 1
- BUG: Unable to use UI controls for the video component when HOT 1
- BUG: GrapeJs not loading on browsers sometimes
- BUG: GrapesJS Fails to Apply Styles to Wrapper HOT 1
- image send to mail HOT 2
- BUG: GrapesJS CDN not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grapesjs.