Skip to main content
← Design & Bravo Tags
Design & Bravo Tags November 9, 2021 · 2 replies

How to deal with flexible content wrappers

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

To create a list populated with API my list items must be [containers], right? This means that I can’t really wrap them in another frame (since [containers] need to be 2nd level frames) to recreate a layout like this:

list-screen.png

I was trying to work around this by cutting it into slices (à la 2000s 🙂 ) but it won’t work with rounded corners and odd number of list items.

Similarly, I don’t think there’s a way to wrap [flexo] text inside a frame that is not a [container]. If true it means that something like this is currently also not possible:

modal.png

Because I would end up with this:

modal-flexo.png

I’ve spent hours to figure it out and come up with this hacky solution where I tag my text layer as [flexo] [component:text:html] and inject <p> with inline CSS into it.

Bravo’s master tag list only mentions size and color as supported attributes but it turned out a few more, like display and text-align, works as well. Unfortunately, padding not being one of them.

That said, it so happens that margin did work and behave exactly as padding would (background color going into the extra space). So this is where I’m right now:

modal-css.png

Unfortunately, as mentioned above, padding doesn’t work so I’m not able to remove extra space below my paragraph. Rounded corners are also not supported - I’m using another “slice” [container] above my text to fake it.

So yeah - all this to basically say that it would be great to have some kind of wrapper tag that will maintain Figma styling (like borders, shadows, etc.) but also be responsive to the content inside of it.

Or alternatively, it would help to have better support for inline CSS attributes.

Also, don't hesitate to bash me if I'm missing something and above are actually possible to achieve right now 🙂

2 replies

SunnyDay November 29, 2021

I'm afraid I can't help you, but I am interested in how you inject CSS into the app. Can you post the exact text you get from the API? Unfortunately, the documentation of Bravo Studio currently does not give any concrete examples of how this is being done.

This doesn't work for example: <p> 555 </p>

I've tried your example from the other thread here too. It simply shows a text in the Bravo Studio app starting with <span.

SunnyDay November 29, 2021

Finally got it to work. As a reference for others, this is exactly what I have in Airtable:

"<span style=\"color: red;\">" & "hi" & "</span>"

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord