Hi, I implemented a dark and light theme into my app. I did this by adding an attribute to my User data type called “is_dark_mode”. I then added conditional states to every single style element in my app and defined a dedicated background and font color in case this attribute was “yes”.
Then, Bubble limited the complexity for conditional styling. That came like shock. The elements which had conditions set to consider the user attribute still worked as expected. But I was not able to add such conditions to new styles anymore. I decided to get rid of the seperate themes. After getting rid of all conditions in the style elements, the app felt way faster.
Performance is already my main concern with bubble. Please let me know of technical details to consider. For example: Once the page is loaded, is the user attribute for is_dark_mode stored in the browser and can be accessed by all style elements? Or is it loaded several times for different elements? Is the conditional style applied for all elements using this style at the same time or does every element validate how it should like?
Any experience from people who implemented different themes is appreciated.
Thanks
Michael