-
Notifications
You must be signed in to change notification settings - Fork 9
[EN] Styling the widget
walli545 edited this page Dec 30, 2020
·
1 revision
It is possible to customize the styling of the widget by defining css custom properties. Just add the following code snippet to your global or project css definitions in vis. Adjust the colors and fonts to your liking. The comments can be removed if they are not needed. All properties can be omitted as they come with reasonable default values, just include the ones you want to change.
When inserted into vis errors are shown, you can just ignore them, it should work nevertheless.
app-on-off-schedule-widget {
/* Primary color (button background, toggle switch color) */
--ts-widget-primary-color: #337ab7;
/* Background color of the widget */
--ts-widget-bg-color: #424242;
/* Background color of the triggers */
--ts-widget-trigger-bg-color: #272727;
/* Foreground color (font color and scrollbar color) */
--ts-widget-fg-color: white;
/* Font color of the switched states id */
--ts-widget-oid-fg-color: #a5a5a5;
/* Font color in buttons */
--ts-widget-btn-fg-color: white;
/* Font color of a disabled weekday */
--ts-widget-weekdays-disabled-fg-color: #5D5D5D;
/* Font color of an enabled weekday */
--ts-widget-weekdays-enabled-fg-color: white;
/* Font color of the name of the widget (defaults to --ts-widget-fg-color) */
--ts-widget-name-fg-color: white;
/* Font color of switched time (defaults to --ts-widget-fg-color) */
--ts-widget-switched-time-fg-color: white;
/* Font color of switched value (defaults to --ts-widget-fg-color)*/
--ts-widget-switched-value-fg-color: white;
/* Font color of the astro time (defaults to --ts-widget-fg-color) */
--ts-widget-astro-time-fg-color: black;
/* Font color of the astro time's shift */
--ts-widget-astro-shift-fg-color: #5d5d5d;
/* Font color of condition (defaults to --ts-widget-fg-color) */
--ts-widget-condition-fg-color: white;
/* Font family used in the whole widget */
--ts-widget-font-family: 'Roboto', 'Segoe UI', BlinkMacSystemFont, system-ui, -apple-system;
/* Font size of the name of the widget */
--ts-widget-name-font-size: 2em;
/* Font size of the switched oid */
--ts-widget-oid-font-size: 30px;
/* Display of edit name button. Use 'none' to hide the button and 'block' to show it
--ts-widget-edit-name-button-display: block;
/* Display of condition. Use 'none' to hide the condition and 'block' to show it
-ts-widget-condition-display: block;
/* Applies a filter to icons used in buttons (safe, edit, remove, cancel), for
white use invert(1) and for black invert(0) */
--ts-widget-img-btn-filter: invert(1);
/* Add trigger dropdown background color */
--ts-widget-add-trigger-dropdown-bg-color: #f1f1f1;
/* Add trigger dropdown font color */
--ts-widget-add-trigger-dropdown-fg-color: black;
/* Add trigger dropdown hover background color */
--ts-widget-add-trigger-dropdown-hover-bg-color: #ddd;
/* ! Changing these may break the layout, change at your own risk */
/* Font size of weekdays */
--ts-widget-weekdays-font-size: 23px;
/* Font size of switched value (on/off) */
--ts-widget-switched-value-font-size: 2em;
/* Font size of switched time */
--ts-widget-switched-time-font-size: 2em;
/* Font size of the astro time (e.g. Sunrise, ...) */
--ts-widget-astro-time-font-size: 1.5em;
/* Font size of the astro time's shift */
--ts-widget-astro-shift-font-size: 1em;
/* Font size of condition */
--ts-widget-condition-font-size: 1em;
}