css: support special css property class for adding custom classes to widgets (#361)

This commit is contained in:
jean-emmanuel 2018-10-22 19:20:20 +02:00
parent 0b2a94e0d8
commit 2185408fea
3 changed files with 32 additions and 2 deletions

View file

@ -34,6 +34,14 @@ CSS selectors can be used to apply styles to specific elements:
!!! tip ""
Mixing Inline and Selector syntaxes doesn't work, once you use selectors, you have to use the `:host` selector to target the widget element.
## Extra css classes: `class`
This non-standard css property can be used to add custom css classes to the widget element: `class: my-custom-class;`
Multiple classes can be added (one per `class` statement).
!!! warning ""
Using class names that are already used in the app can be hazardous. In order to avoid that, custom class names should be prefixed with something uncommon and preferably cool, such as `xxx-myclass` or `crispy-bacon-myclass`.
## Layering: `z-index`
Z-Axis ordering can be set using the `z-index` rule. Absolutely positionned widgets (when `top` or `left` is different from `auto`) have `z-index:10;` by default.