I have a .css link that is hard coded into the app – I want to make regular updates to that .css file which is hosted on bubble (in the file manager)
I am not finding an answer the following process
1 - Create a .css file that will be stored on bubble cdn
2 - Run another WF to update the contents of the .css content with new code
3 - Purge CDN if neccessary
I have the css link to the file hardcoded – that way, I only need to modify the code of the .css to update the ui without needing to reload the entire app to see changes to the ui
Your CSS should probably be a dynamic data on the page then. Click the page in the element tree, find the HTML header and insert the dynamic data source of your CSS script. Then just add a section in an admin panel to update the CSS script.
We run a whitelabel sass service. Each app has its own branding. Loading colors from bubbles db was too slow so
We store the css on supabase for its GET query speed
In the header in bubble settings I injected a code to call out to supa, grab the css, and inject it at run time. This happens incredibly quick and almost always…before the rest of our data from the bubble db loads. Items that require this css are transparent on page load and receive a color from the css to avoid flashes of 2 colors for 1 element.
This allows our cxm team to manage the supabase data via a nice airtable interface and update supabase values with the click of a button from airtable.
Then the data is consumed and applied on page load before the rest of the page.
That’s interesting - GET to Supabase was quicker than GET for a data type field? Does the Supabase API call run from the client or have to go through Bubble’s server?
I have made a whitelabelled app that uses custom primary colours and the CSS is loaded instantly (from Current User’s Agency’s color where color is a HEX). There’s no flashes of the default colours because the default color is Current user’s agency color and is empty when the data is loading. Just trying to work out why that didn’t work for you.
Edit: here’s a demo with an ugly square in the top right:
@georgecollier quick question. Assuming you have set binding on the Current User’s Agency Colour, what if a bored or creative user plays around with the colour picker changing colours for a while - how would this impact WU?