Tiki 26 uses Bootstrap 5.3, which introduces color modes, the ability to have web pages respond to the browser color preference, if set, and to the user choice by means of a switch on the page. Because the color modes are using CSS custom properties (CSS variables), the color change is instant — no need for a page refresh. Themes made for previous versions of Tiki need some specific updating to take advantage of this feature.
For background, see
To update a theme for Bootstrap 5.3 and color modes, these steps are suggested. This is what was done to update the themes in the Tiki package. With the new files added and their import statements added, the next step is to compile the theme, but there will be errors due to undefined variables. These are variables that typically need to be in the variables.scss file and properly defined: | Variable name | Default value | Variables file section | Used for | The theme should compile after all these variables are in the theme's variables file.Procedure used for the Tiki package themes
@import "../../base_files/scss/_tiki-pagetop_colors.scss";
after the import statement for ../../base_files/scss/_tiki-selectors.scss.
|---|---|---|---|
| $prefix | -bs | Options | Used for :root CSS variables |
| $link-shade-percentage | 20% | Links | Calculation of hover color relative to link color (this is the default, replacing the specifying of a hover color). |
| $code-color | $body-color (was $pink) | Code | The text color of code examples, etc. Many of Tiki's packaged themes didn't have this specified but it's necessary. |
| $pink | #d63384 | Color system (formerly Colors) | Needed for $code-color (if $code-color: $pink). UPDATE: The default code color
| $green-300 | tint-color($green, 40%) | Color system | Form validation text - valid |
| $green | #198754 | Color system | Needed for $green-300. |
| $red-300 | tint-color($red, 40%) | Color system | Form validation text - invalid |
| $red | #dc3545 | Color system | Needed for $red-300. |