Customise tabi with skins and a default theme
Table of Contents
Learn how to customise tabi using skins and setting a default theme, making your site uniquely yours. tabi can be customised in two ways: by setting the default theme (dark or light) and by choosing the main colour for the theme (skins). Use Setting To permanently set your site to either the dark or light theme, you need to disable the theme switcher in For example, to have a permanent dark theme: Not a fan of teal? No problem! tabi has 12 skins for you to choose from. If none of these work for you, you can create your own. A skin is a CSS file with two variables: the primary colour for the light theme, and the primary colour for the dark theme. Enabling a skin is as easy as setting the Take a look below at the available skins below. Click on the images to switch between dark and light themes. The default skin. If the To apply, use Switch to this by setting A skin designed by 🅿️. Activate it with Inspired by the Japanese cherry blossom season. To enable this skin, adjust For this appearance, set Indigo for blue (in light theme) and ingot for gold (in dark theme). To activate this skin, use Inspired by the colours of Evangelion Unit-01 (in dark theme) and Unit-02 (in light theme). To achieve this look, set WARNING! This skin’s light theme may have low contrast, affecting accessibility and Lighthouse rating. (Dark theme is fine.) To use, set WARNING! This skin’s light theme may have low contrast, affecting accessibility and Lighthouse rating. (Dark theme is fine.) To enable it, specify WARNING! This skin’s light theme may have low contrast, affecting accessibility and Lighthouse rating. (Dark theme is fine.) For this colourscheme, choose You’re not just limited to predefined skins. Why not create a look that’s distinctively tailored to your preferences? You can save your new skin it in either of these two directories: Create a new Modify the colours to your taste. Once you’re satisfied, update the Remember to consider the accessibility of the colours you choose. Here’s a link that can help you: WebAIM: Contrast Checker. The background of the light theme is Default theme
default_theme = "dark"
to set the dark theme as the default, or default_theme = "light"
to set the light theme as the default.default_theme = ""
(or commenting out the variable) will follow the user’s system preference (light or dark mode).config.toml
and set your preferred theme as the default_theme
.[]
= false
= "dark"
Skins
skin
variable in your config.toml
with the name of the skin. For example:[]
= "sakura"
Teal
skin
variable is unset (or set to "teal"
), this is what tabi looks like: Lavender
skin = "lavender"
. Red
skin = "red"
. Mint
skin = "mint"
. Sakura
skin = "sakura"
. Blue
skin = "blue"
. Indigo Ingot
skin = "indigo_ingot"
. Evangelion
Monochrome
skin = "monochrome"
. Low contrast orange
skin = "lowcontrast_orange"
. Low contrast peach
skin = "lowcontrast_peach"
. Low contrast pink
skin = "lowcontrast_pink"
. Create your own skin
themes/tabi/sass/skins
sass/skins
(you’ll need to create this folder).scss
file (for example, your_skin.scss
) in your preferred location. This file needs to have these two variables (this is the default skin, “teal”):// This defines theme-specific variables.
{
{
// Light theme colours.
:; // Contrast ratio: 4.73:1
}
{
// Dark theme colours.
:; // Contrast ratio: 11.06:1
}
}
// Apply light theme variables by default.
{
}
// Apply dark theme variables when dark theme is explicitly set.
{
}
// Apply dark theme variables when user's system prefers dark mode
// and the theme is not explicitly set to light.
{
{
}
}
skin
variable to match your filename.#fff
, and the dark one is #1f1f1f
.