Duplicate CSS written under media queries
GrapeJs Editor Initialization Test Block Added Output @artf I am trying to add a custom block and providing HTML/CSS of the block via content attribute. When I drop the block onto the canvas then Media Query CSS is added twice to DOM Element with class gjs-css-rules-480px . It only happens if I provide CSS via content...
Read full answer below ↓Question
Hey @artf Great work on the project!
I noticed something and I am able to reproduce it on my local machine too. Any css written under media queries is being duplicated/applied twice.
Grapesjs Version - 0.14.33
Browser - Version 69.0.3497.100 (Official Build) (64-bit)
OS - Windows 10
Demo - https://grapesjs.com/demo.html
Answers (3)
GrapeJs Editor Initialization Test Block Added Output @artf I am trying to add a custom block and providing HTML/CSS of the block via content attribute. When I drop the block onto the canvas then Media Query CSS is added twice to DOM Element with class gjs-css-rules-480px . It only happens if I pro...
Link to GrapeJS I am fetching - https://grapesjs.com/js/grapes.min.js?v0.14.33 In my debugging (might be wrong), in the file : ./src/css_composer/index.js When a rule is added The rule is matched against existing rules, if not present then added else updated. Somehow, in the compare function it is...
Thanks Yomesh, I'm investigating on this
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1506
Css Media Query Issue
Hello @artf There is an issue on demo page as well as library in media query. Issue is that if user update style on mobile view first and t...
Issue #896
[BUG] Media query rules are overridden by class rules in canvas
Hi @artf , I've noticed an issue while testing one of my templates using different device configurations that supposed to trigger media que...
Issue #1319
BUG Box shadow - not working in the demo too
I have noticed this too late, a few days after finishing my project. I wanna cry :( To reproduce the steps: 1- Go to the demo and select an...
Issue #2044
Npm start to develop on local server didn't work
Did the procedure to start the local server using dev branch as described on README, it worked on the console, but fails on chrome and the...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.