Issue #3525πŸ’¬ AnsweredOpened June 9, 2021by anlumo0 reactions

In Style Manager, Allow Requiring the Default Setting

Quick answerby artf

Hi @anlumo, did you try to extend float definition with something like this requires: { position: ['static'] }?

Read full answer below ↓

Question

What are you trying to add to GrapesJS? The CSS property float only makes sense for position: static; elements, which happens to be the default. I only want to display the float radio selector if the position is not set to anything else. However, if I add require: ['static']; to the property definition, the setting is only shown when I explicitly set the position to static, not when I leave it at the default (which is also static). Is there an alternative at the latest version?[ ] Yes (describe the alternative)[X] No Is this related to an issue?[ ] Yes (Give a link to the issue)[X] No

Answers (3)

artfβ€’ July 5, 2021

Hi @anlumo, did you try to extend float definition with something like this requires: { position: ['static'] }?

anlumoβ€’ July 8, 2021

Yes. It seems to work fine after reloading the page, but when you toggle the position it stops working and looks like in the screenshot. The definition is as follows:

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @anlumo. Great suggestion about FEAT: In Style Manager, Allow Requiring the Default Setting! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: Listen to selector:add f...

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 β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.