Directory

← Back

BodyStyles

Server side extension for modifying and inspecting class names of body element

Author

Contributors

Rating

As some components are drawn outside UI's element, it has been hard to do temporary styling changes to windows and other popovers. This extension allows you to modify body element's class names and this way change presentation of those elements.

Sample code

// Add your tempory class name to body
BodyStyles.addBodyClassName("foobar");

// And remove if later
BodyStyles.removeBodyClassName("foobar");

// Ask current class names of body element
BodyStyles.getBodyClassNames(new BodyStyles.BodyClassNamesCallback() {
        @Override
        public void onBodyClassNamesReceived(List<String> classNames) {
              // ... do something with classnames ...
        }
}

Links

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2014-03-12
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.1+
Browser
Browser Independent
Online