Why the “text” is not completely in the green area ?
@Route(value = "test")
@StyleSheet("context://styles/style.css")
public class TestView extends VerticalLayout {
public TestView() {
addClassName("bg-red");
HorizontalLayout hlay = new HorizontalLayout();
add(hlay);
hlay.setDefaultVerticalComponentAlignment(Alignment.CENTER);
hlay.addClassName("bg-green");
hlay.add(new Text("text"));
hlay.add(new Button("button"));
}
}
<vaadin.version>14.4.9</vaadin.version>