Annotation Interface StyleSheet
Can defines style sheet dependencies for a Component class or
globally.
When this annotation is placed on the
AppShellConfigurator, the referenced
style sheets are injected globally into the generated index.html
during bootstrap. In this case the style sheet is always inlined in the body
of the html page, thus LoadMode values are ignored.
For adding multiple style sheets, you can use this annotation multiple times. It is guaranteed that dependencies will be loaded only once.
Absolute URLs are used as-is; values prefixed with context:// are
resolved using context path (e.g. context://styles.css becomes
/my-app/styles.css) for context path /my-app.
NOTE: while this annotation is not inherited using the
@Inherited annotation, the annotations of the possible
parent components or implemented interfaces are read when sending the
dependencies to the browser.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceInternal annotation to enable use of multipleStyleSheetannotations. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueStyle sheet file URL to load before using the annotatedComponentin the browser.Relative URLs are interpreted as relative to the configured
frontenddirectory location. You can prefix the URL withcontext://to make it relative to the context path or use an absolute URL to refer to files outside the frontend directory.- Returns:
- a style sheet file URL
-
loadMode
LoadMode loadModeDetermines the dependency load mode. Refer toLoadModefor the details.- Returns:
- load mode for the dependency
- Default:
EAGER
-