benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

Make color scheme support more flexible (or update docs?) #1446

Open netbrothers-tr opened 1 year ago

netbrothers-tr commented 1 year ago

Feature Request

Is your feature request related to a problem? Please describe

Note: This concerns the navigation bar but other components might also be affected.

The docs describe two acceptable settings for page.theme.navigation.style. These are default and inverse.

However, this raises the problem, that the color scheme update mechanism provided by Bootstrap, which works by either using a data-bs-theme-attribute on the <html> tag or by simply setting the preferred color scheme in the operating system or in the browser, doesn't work.

In the files Resources/Public/Scss/components/navbar/_style.scss and Resources/Private/Partials/Page/Navigation/Main.html one can see the either-or-approach of Bootstrap Package.

Workaround

By setting the constant page.theme.navigation.style to undefined (for instance) in your site package, you're able to break out of this behavior and it works like intended.

Describe the solution you'd like

Bootstrap Package should aim to flawlessly support light and dark mode taking into account the web standard and the recent developments regarding color modes in the Bootstrap project.

As a quick fix it might be enough to update the docs and allow for a third value (e.g. undefined) and then do not print any additional class into the navigation template.