Inline style overrides ID-based CSS rules
Thanks for the report @jsxOverdose Will be fixed in the next release
Read full answer below βQuestion
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v135.0.7049.96 Reproducible demo link https://jsfiddle.net/bqkLwt8j/ Describe the bug When an element has an inline style and also matches an ID-based CSS rule, the styles from the ID selector are removed - even if the inline style doesnβt override those properties. However, this issue does not occur with class-based CSS rules, which behave as expected. How to reproduce the bug? Add a CSS rule for a specific ID, e.g. #frame2 { color: red; } Add an element with that ID and an inline style, e...
Answers (2)
Thanks for the report @jsxOverdose Will be fixed in the next release
You've accurately identified a specific behavior in GrapesJS where inline styles appear to completely override ID-based CSS rules, even for non-conflicting properties. This is indeed a deviation from standard CSS specificity rules and can be considered a bug in how GrapesJS's internal style managem...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4097
MousePosFetcher in resizer config & change:style listener not working
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Brave V1.34.81 Reproducible demo link http...
Issue #6365
Style Manager Fails to Interpret Descendant Selectors Correctly
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 131.0.6778.205 Reproducible...
Issue #5746
ColorPicker Offset incorrect when Panels are outside of Editor Container
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v122 Reproducible demo link https:/...
Issue #5450
Section should be overlapping issue present in grapes js
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 117.0.5938.134 (Official Build) (6...
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 βBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.