Forum Academy Marketplace Showcase Pricing Features

Request: Would like to change styles conditionally

Hello,

I was wondering if there could be a way to change the style of an element in the conditions. It would be nice to set up styles before hand and manipulate created styles the same way you would change the background color or text. It seems like a cool way to say, create custom pre-made themes for pages based on how the user would like to view your app. or create different button styles for clickable and not clickable. Instead of having to change the values manually everytime.

These are terrible examples, but it would seem like there could be lots of uses for this to be available.

I know you guys like to get suggestions and ideas of how to make bubble better. I hope this helps. Love what you are doing here!!!

8 Likes

I just ran into this scenario.

I think this is a good idea too - though obviously not as critical as some features.

My scenario/
Rather than conditionally change the:
font color
border
boxshadow

If I could change the Style of the element - I could accomplish all three of those changes much more efficiently.

Just came across the same need.

I’m worried about the maintenance implication of changing various style-related properties one by one.

Switching the whole style to another pre-created style would feel very safe, knowing that any new modification of the style would be applied.

+1 for changing style on a condition.

The use case I ran into is an inline edit form. I see a couple ways to do this right now.

  1. Have a text element paired with an input element and toggle for edit. Benefit of this is common styling of both elements across the app. Downside is the alignment of the two, and having to manage two elements.

  2. Use a single input element that is disabled and looks like plain text and then conditionally is enabled and styled to look like an input. Problem is that you have to style the elements individually, so if the style changes you have to touch each element in the app.

Having a conditional style would allow the use of #2 above and streamline changes and enforce consistency.

2 Likes

+1 here too. This will save allot of time.

Also on a side note. There are some elements that don’t have all of there style settings in the style tab. For example the multiselect element.

Another note. A default invalid style also

1 Like

+1 here. Surprised this isn’t an option already.

+1 here.

Yes, +1

While this would be nice to have and would be a nifty quick-and-dirty way to enable interesting features like listing pages or profile pages that are semi-customizable (themes basically as the OP expressed it), I suspect the reason Bubble hasn’t implemented this is performance issues.

There wouldn’t be any huge performance impact for things like button styling. But you know what people are going to do with it. They’re going to use different fonts. This would require loading all fonts that might possibly be used in all styles that might be swapped dynamically at runtime in advance of showing any page.

(I want this feature too, but I can just see the “why does my index page use 100 Megs when all I’m doing is… [something that seems really simple but is actually a huge bandwidth/memory suck]” posts.)

This wouldn’t be particularly easy to implement for the less memory intensive use cases either… probably involves major changes to how Bubble would create stylesheets.

Obviously it’s not impossible. But I get the sense this isn’t a quick win sort of feature.

This is indeed not simple, both in terms of implementation and UX. For instance, how does it work when a style has a condition that modifies the font, then the user modifies the style when the same condition is met, and in addition to that, the font is being modified directly under this condition at the element level… Who wins?..

This can be quite messy.

1 Like

I just wanted to vote for this as well, even if it means not being able to change the font. That’s fine with me!

2 Likes

one more vote for whitelabelling use case

A cascading rule like in CSS seems a commonly accepted solution?

Customizing every single element by hand for a whitelabelled UI for example is crazy.

Any chance the new layout engine might make this more feasible?

After four years, it’s still a pain point for some common use cases.

I moved this request to Bubble’s official Ideaboard, so if anyone else comes across this thread, just enter “style conditionally” into the summary field on that page to find and upvote my submission.

-Steve