Adding the !important property on Blocs 4

Would be so great to have the option to over rule with the !important property using blocs custom class. It will solve us lot of problems :smiley:

2 Likes

I currently use Page Settings > Code to add “!important” manually. But I see you want that in the Class Editor GUI. The problem is, how would that be implemented? You wouldn’t want every feature of the Class Editor to be granted “!important” status, and yet you could not add an icon next to each feature in that dialog box since it would become too cluttered. How do you suggest it be added?

1 Like

It could be implemented in a similar way as we can pick the measurements like px, em, or %.
Why could not we add a small checkbox or similar to each element?
It is rather an UI issue than a development challenge but totally doable in my opinion.

3 Likes

Trust me, I had thought about that prior to writing my previous post. I personally think that having hundreds of checkboxes would clutter the UI so much it would no longer be a joy to use. The only way I think it could work is if you could disable those checkboxes normally. Perhaps holding down the Command key could reveal them. To avoid UI clutter is the main thing. The Blocs 4 UI already has an increased amount of complexity as it is.

Something like this as @RobertPetras suggested!

Hmmm… Well, the current UI doesn’t allow for multiple selections in those pop-ups. Doing it that would would be contingent upon making multiple selections. For example, you would still need to choice if you want a px or % width, and ! would not be a third alternative but rather a choice in addition to the other too.

If it is possible, then I would only suggest a horizontal line separator to group px & % together so that ! is isolated.

Overall, I do think that just might work and keep the UI clutter free.

Although being able to add !important to a style would be great. It does have the potential to make problems for people not familiar with CSS nor with the ability to diagnose why something isn’t working. Especially if they don’t build with a tidy class structure.

Not to mention the UI issues with so many more style properties available in Blocs 4.

maybe it could be done with a dev feature. I mean the normal blocs and if you change into developer mode it gets all :nerd_face: :nerd_face: :nerd_face: :nerd_face: :nerd_face:

2 Likes

Blocs 4 Plus Pro Max Special Developer Edition :sunglasses:

7 Likes

Now you’re taking @Eldar :partying_face:

haha!! even the name sounds nice!

1 Like

Rolls off the :tongue:

Blocs 4 PPMSDE

2 Likes

It might be dangerous but honestly, a pop up warning with a link to how it should used could prevent breaking a lot of website.

I think !important should be used as little as possible.

3 Likes

Sometimes you need to overrule things blocs doesn’t allow you do and its very simple to do it if you were writing the code from scratch.

1 Like