Directory

← Back

CssPrime

ClientSide component for inject dynamic css style rule

Author

Rating

Popularity

<100

UI Extension for adding and managing css rules.

Extension create map for css rule in shared state. Adds a style branch to the head section of the HTML source code Allows you to update selected css rules

Sample code

--add extensio to ui
UI ui = UI.getCurrent();
CssPrime css = new CssPrime(ui);
...
css.setSyle(<style rule>);
css.setSyle(<rule key>,<style rule>);

-- append rule
css.setStyle("div{background:red;}"); //add rule with default key
css.setStyle("MyBackground","div{background:red;}");

-- update rule
css.setStyle("div{background:red;}"); //update rule with default key
css.setStyle("MyBackground","div{background:blue;}");

-- remove rule
css.removeStyle; //remove rule with default key
css.removeStyle("MyBackground"); 

--remove extensio from ui
UI.getCurrent().removeExtension(cssPrime);

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
2017-06-04
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.0+
Browser
N/A

CssPrime - Vaadin Add-on Directory

ClientSide component for inject dynamic css style rule CssPrime - Vaadin Add-on Directory
UI Extension for adding and managing css rules. Extension create map for css rule in shared state. Adds a style branch to the head section of the HTML source code Allows you to update selected css rules
Issue Tracker
Source Code
Author Homepage

CssPrime version 1.0-SNAPSHOT
null

CssPrime version 1.0.1
null

CssPrime version 1.0.2
add missing widgetset file

CssPrime version 1.0.3
null

Online