Develop a theme
Once you become familiar with the concept of theme, you will probably want to develop your own. This page therefore serves as a quick "tutorial" so that you can master the main blocks constituting the creation of a theme applicable to overlays and/or docks.
To find out how to host your theme, go to the dedicated page.
Skeleton
The basic skeleton of a Multistream Tools theme is as follows:
:root {
/* CSS variables go here. */
}
/* Optional, French related changes for example. */
:root[lang|='fr'] {
/* Translated CSS variables go here. */
}
/* Your own styles go here. */
Then it will simply be a matter of redefining the value of the variables exposed by our CSS framework and/or those exposed by the overlay or dock that you want to modify ; or even define new ones.
In addition to variables, you can optionally act on all the selectors of your choice in order to completely change the visual appearance of the HTML page, everything is possible!
Take inspiration from the source code of our ready-to-use themes to create new themes in no time!
Overlay
In order to stylize an overlay - official or third party - using our overlay.css file, refer to their documentation to identify the variables and selectors available to change their behavior.
Here is an example based on our overlay named Featured:
:root {
/* System variables */
--fontSize: 30px;
--spacing: 1.5rem;
/* Overlay variable */
--background: red;
/* New variable */
--bodyBackground: blue;
}
body {
background: var(---bodyBackground);
}
Here we redefine two system variables named --fontSize
and --spacing
, a variable specific to the Featured overlay named --background
and add a new one (specific to our theme) named --bodyBackground
. The latter is then used to change the background color of the body
element.
Dock
In order to stylize a dock - official or third party - using our dock.css file, refer to their documentation to identify the variables and selectors available to change their behavior.
Here is an example based on our dock, also applicable to all those accompanying our ready-to-use overlays:
:root {
/* System variable */
--color1: red;
/* Dock variables */
--textTier2: 'tier 2 ';
--textTier3: 'tier 3 ';
/* New variable */
--messageDisplay: none;
}
.event[data-message]::after,
.event > .message {
display: var(--messageDisplay);
}
Here we redefine a system variable named --color1
, two dock-specific variables named --textTier2
and --textTier3
, then add a new one (specific to our theme) named --messageDisplay
. The latter is then used to hide messages related to events displayed in the activity feed.