How to change the width of drawer in Vaadin AppLayout

107 Views Asked by At

My class MainLayout extends AppLayout. I am using Vaadin 14. I added this to this class:

@CssImport(value = "./styles/drawer-styles.css", themeFor = "vaadin-app-layout")

I found 4 different solutions for this on Stackoverflow and Vaadin forum. I tested each one of these in the CSS-file drawer-styles.css. But none of them worked. How can this be solved?

1

There are 1 best solutions below

4
Rolf On

T he following CSS should work in that stylesheet:

[part="drawer"] {
  width: whatever-you-want;
}