CSS Classes
To uniformly style multiple cards with minimal work, CSS Classes are the way to go.
More than one class can be enabled to style a tool.
Basic usage¶
1 2 3 4 5 6 7 8 9 |
|
Default tool classes¶
SAK defines classes with default styling for all the existing tools.
These classes are defined in the sak-css-definitions.yaml
file in the sak_templates
folder.
Default classes are automatically assigned to the tools
There is no need for the user to specify these classes in the tools configuration.
Don't change this file!
If you want to change the default definition, see the next chapter...
Overriding default tool classes¶
The default css classes used by SAK to style the tools can be altered by overriding these classes in the user-css-definitions.yaml
file.
Say you don't like the fact that text is spaced for the entity name and you want to set that to 0.
The SAK definition is:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
You override the letter-spacing
in your own definition with a value of 0:
1 2 3 4 5 |
|
Using your own tool classes¶
Just as you can override default SAK classes, you can define your own set of classes to style your tools.
These classes are defined in the user-css-definitions.yaml
file in the sak_templates
folder.
Example #8, the Homekit alike cards use user defined classes to style the cards.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
view-sake8.yaml
file: 1 2 3 4 5 6 7 8 |
|