Can't overwrite gjs-selected class
Please refer to https://github.com/GrapesJS/grapesjs/issues/3515
Read full answer below ↓Question
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Arc 1.1.1 Reproducible demo link https://jsfiddle.net/3bprucnv/3/ Describe the bug How to reproduce the bug? Add custom css rule for .gjs-selected eg. change the border color to red. .gjs-selected { outline-color: red; } What is the expected behavior? When selecting an element within grapesjs editor, the border of the selection should be red. What is the current behavior? Border/outline remains blue. Note: All other css overrides related to selection/highlighting are successfully overwritten (eg....
Answers (2)
Please refer to https://github.com/GrapesJS/grapesjs/issues/3515
The issue you're encountering with the .gjs-selected class not accepting your CSS override is due to GrapesJS's default styling for this class using the !important rule. GrapesJS applies outline: 3px solid #3b97e3 !important; to .gjs-selected to ensure its selection border is consistently displayed...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5173
editor.Css.setRule API not working as expected, it is not updating the rule existing rule.
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 112.0.5615.137 (Official Build) (a...
Issue #6318
Unable to use transparent fill in Block media svg
GrapesJS version[X] I confirm to use the latest version of [email protected] when this issue was filedWhat browser are you using? Fir...
Issue #4411
XSS when add class name to Selector Manager
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v102 Reproducible demo link https:/...
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...
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
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GrapesJS vs Webflow vs Tilda (2026): Honest Comparison, Pricing & Which to Pick
GrapesJS vs Webflow vs Tilda compared head-to-head: real 2026 pricing, SEO features, code export, and which one actually fits your project
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.