Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
Adding a CSS style with ::after to a text field
Hi,
I am trying to apply the following style to a Vaadin text field, which adds superscript text in an "::after" element:
.mystyle::after {
content: "superscript text";
vertical-align: super;
font-size: 80%;
color: gray;
font-style: italic;
}
I can call "textField.addStyleName("myStyle")", and the style name shows up correctly in the DOM, but the ::after element is not displayed in the browser (and also not in the DOM view). Why?
Last updated on
... it's a problem of HTML: input components (such as text fields) do not support CSS ::after styles.
Last updated on
You cannot reply to this thread.