Optionally insert styles from StyleManager with !important
Question
I'd like to suggest a feature that can be enabled through config: styleAsImportant: true (defaults to false, i.e. non-breaking). I thought this was already possible by configuring the cssComposer, though I've now learned that this is not the case (see below for an explanation). I am working with templates that sometimes were generated from pre-compilers that excessively use the !important flag. For example a button in a template might be styled as: As a result, styling this button with Grapes has absolutely no effect. The most obvious way to make it work with grapes, is to ensure that: 1) the...
Answers (3)
added PR at #1056
It might be a good idea, but what about improving those events (eg. pass model/pr to callbacks) to allow such customizations
@tommedema Components and CssRules implement Styleable, therefore you would get it in all case. do you mean that we'd have to then write plugins to listen to those events and add additional styling to the component? Not additional, you overwrite the style triggered on that model, eg.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #996
Change attribute value that is generated through trait
Now, let's consider that I wrote new into the trait value but in attribute :items, I want to append prefix like item.text. to that value So...
Issue #859
Change canvas style
Hi there, I have some question about canvas style, in this case i have config like this. By default i use css with name builder-desktop.css...
Issue #908
Add custom classes to panels and other editor elements
When using a UI framework that provides custom classes, it would be nice to be able to use these classes on things like panels, so you woul...
Issue #2011
Building gjs-components
Hello all, Im using grapesjs-webpage-preset plugin and I would like to combine my gjs-html with my gjs-css so that all of the styles are in...
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.