<script>importListStylefrom"~src/web/styles/ListStyle";</script><uldefault-style="{ ListStyle }"style-class="{ this.controlStyle.root }"><li>First Item</li><li>Second Item</li><li>
Third Item
<button>Delete</button></li></ul>
In order to avoid naming conflicts in CSS, ListStyle class is instantiated once and root property style is given a css name that is unique. When we assign default-style it creates an instance of StyleSheet if it does not exist and attaches style to current component.
Best part is, IStyleDeclaration object is JavaScript object and it can contain any valid javascript and it refreshes when device size changes. You don't need media queries.
Styles can be inherited and overridden easily as JavaScript objects. And you don't need to worry about how and where to put in assets. Also style will only be created for the components that are hosted in the page, making browser free of all unused CSS.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have created Web Atoms Core, which has CSS styling as JavaScript code.
HTML
In order to avoid naming conflicts in CSS, ListStyle class is instantiated once and root property style is given a css name that is unique. When we assign default-style it creates an instance of StyleSheet if it does not exist and attaches style to current component.
Best part is,
IStyleDeclaration
object is JavaScript object and it can contain any valid javascript and it refreshes when device size changes. You don't need media queries.Styles can be inherited and overridden easily as JavaScript objects. And you don't need to worry about how and where to put in assets. Also style will only be created for the components that are hosted in the page, making browser free of all unused CSS.