If I would use only flow, how can I remove them? Would it even possible?
Yes, you’d use the same approach as presented above (DOM module). There’s unfortunately no Java API for removing those margins.
Sry, but I don’t understand what is going on with your solution.
To customize the appearance of a component we use something called DOM modules. For example, if you wanted to modify the look of a Vaadin button you would do the following:
Vaadin is indeed trying to make web development with Java as easy as possible. You can often implement all of your functionality without thinking about frontend technologies at all. Styling is more difficult, and we cannot provide Java APIs for all the possible things you can do with CSS.
We do our best by providing a nice looking Lumo theme out of the box, and providing theme variants with type-safe Java APIs to satisfy some of the most common use cases. You can also adjust some CSS custom properties of Lumo to change the default colors etc. across the app. If those are not enough, you need to write some more specific CSS. When you need to change the styling of internal elements inside of a component, you need to go even deeper into CSS and work with theme-modules and themable part-selectors.
As you can see, there are several abstraction levels. More common things should be more easy than the more specific ones. Working on a lower abstraction level gives you the freedom to do anything which we don’t have Java APIs for. So thinking positively, it’s great that you can always jump to the lower abstraction level if some feature is not properly supported, instead of having to hope and wait that a higher-level API is some day implemented.
In my opinion there should at least one more method for all components: removeAllStyles(), or just a way the get blank components. In the tab case it would be useless, I know. Like I sayed: “remove them if you hide the scroll btns.”
With the dialog it is the same. I don’t understand how I can remove the border. You can guess what I do about this: paper-dialog…
I really like your framework, please do not misunderstand it. I even like the polymer stuff (atm can’t imagine to work without it). But in some areas it is gone to far away from “fight for simplicity”.
In my opinion there should at least one more method for all components: removeAllStyles(), or just a way the get blank components.
You can disable all Lumo styles by adding @NoTheme annotation on your view class. But this does it for all the components, so then you need to style everything from scratch.
We are aware that theming is currently one of the biggest pain points in the developer experience with Vaadin, and I think we have invested in improving this area. Hopefully we are able to make it easier…
Like I sayed: “remove them if you hide the scroll btns.”
I don’t actually think it’s related to the scroll buttons, because if you remove the margin, it will looks just fine even with those scroll buttons. I think the margins are there just to make the Lumo tabs feel more spacy (not sure though).
And to make this case a bit easier, you don’t really need the first part of the selector, :host([orientation="horizontal"] ), unless you also have vertically oriented tabs in your app and don’t want to remove margins from those.
So you can probably just select the component with attribute part="tabs" without worrying about the host element’s attributes: