Issue #5293💬 AnsweredOpened August 10, 2023by craigharman0 reactions

Can't overwrite gjs-selected class

Quick answerby artf

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)

GJS HelperMay 17, 2026

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.

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

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.