Vaadin TextField: disabling underline

Nkosi, the style module (which has theme-for="") itself applies to every component of the specified type, but depending on your use case you may be able to scope the styles within the style module using the :host() selector (and giving the specific components you want a custom class name or other attribute). In basic cases this should be simple (if you’re styling a “top level component” directly, but ma be difficult if you’re trying to style a sub component which is part of the shadow root of another component.

See these parts of the documentation for examples:

Styling sub components should be easy too in most cases using the theme attribute propagation as documented in the above link, but in some Vaadin components there are also cases where the theme attribute is not currently propagated automatically. For example this issue https://github.com/vaadin/vaadin-grid/issues/1636