benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.

Home Page:https://www.bootstrap-package.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't activate dark color mode

hilburger opened this issue · comments

Support

Description

I am trying to activate the dark (color) mode from my site package using BSP 14.0.7 on TYPO3 12.4.5 but it just does not seem to use the variables from _variables-dark.scss.

What I have done so far:

In my setup.typoscript:
config.htmlTag.attributes.data-bs-theme = dark

This works and adds the tag properly:
<html lang="de" data-bs-theme="dark" ...

In the theme.scss I have this setup:

//
// Variables
//
@import "variables";
@import "../../tnt/variables";

//
// Import needed Bootstrap Files
//
@import "../../Contrib/bootstrap5/scss/bootstrap";
@import "../../Contrib/bootstrap5/scss/variables-dark";

The tag is added in the html-tag but nothing changes.
Does anyone have an idea why this is not working?

Thanks to all and cheers,
Thomas

My fault - I don't know why but I had
$enable-dark-mode: true;
in my _variables.scss...

Such a stupid mistake... 🥇

Sorry guys!