# compose-web


07/01/2021, 5:08 AM
Hi everyone! I was wondering about the nesting of modifiers in Compose for Web. Example:
Copy code
fun ModiferTest() {
    Box(Modifier.background(Color.Blue).padding(16.dp).background(Color.Red).padding(8.dp).background(Color.Green)) {
        Text("Modifier Test")
As you can see in the images, the function works correctly on Compose for Desktop, but on Compose for Web it discards all but the innermost modifiers (due to the way that modifiers currently work on web). This breaks the idea that each modifier doesn't need to have knowledge of the inner content/modifiers, which seems like an important aspect of the Compose UI system. Obviously multiplatform widgets are still experimental, but I wanted to know if something is planned to address this, since it seems like a somewhat core issue
👀 2
💯 1

[JB] Shagen

07/01/2021, 10:42 AM
Hi! We aware of this - unfortunately you are right. We've decided to do following - to do our best with trying to deliver same experience with using html and, at the same time, work in direction of being able to render standard components in canvas. Unlike popular opinion those are not mutually exclusive scenarios. However right now we are working on polishing and improving html layer so that we'll be able to move forward with delivering same experience in html. I can not give exact estimates however optimistically we'll be back for gradually improving components UX (both in html and canvas)
👍 1


07/01/2021, 2:02 PM
@[JB] Shagen So there is a plan to allow rendering standard compose components to canvas on web? Am I understanding that right?

[JB] Shagen

07/01/2021, 2:03 PM
We want to achieve it at some point, Scott
👀 2
🎉 15
K 3