Styling vaadin upload file

https://vaadin.com/docs/latest/components/upload/styling#file

Hello,

If I use in my styles.css file this:

vaadin-upload-file.my-style::part(row) {
  display: none;
  border: 1px solid blue;
}

And then

upload.addClassName(“my-style”)

The style is not applied, do you know why?

Why would you think that applying a class name to “vaadin-upload” would propagate it to its children “vaadin-upload-file”? Did you check the DOM in your browser?

The same is not being replicated to their children, that’s what is happening to me.

Soo, i should be using this approach, what do you think ?

Before I go into more details… did you try the obvious one?

vaadin-upload.my-style vaadin-upload-file (… Insert here more …)

This works pretty well, damnnn

I didn’t need to use @CssImport, it’s much more like that, plus the new hot swap functionality of the css without redeploy…