Search code examples
typo3typo3-extensionstypo3-12.x

t3sbootstrap with customScss


Good morning everyone, is anyone here using t3sbootstrap? I can’t manage to include a custom.scss file and could use some support.

The system behaves as if my custom-variables.scss file doesn’t exist.

Does anyone have an idea and can help me out?

Thanks, Markus

Setup:

  • TYPO3 12.4.23 composer installation
  • t3sbootstrap 5.3.18
  • t3sb_package current git version (dev-main)

In the constants, I’ve set bootstrap.customScssPath to EXT:<my_sitepackage>/Resources/Public/Scss/. In this directory, I have a custom-variables.scss and a custom-styles.scss. I’ve run the scheduler task t3sbootstrap:customScss multiple times (without any errors), cleared the temporary files, but still, nothing changes – not even an error message.

I'd want to change the primary color globally, but nothings happens. No error occured.


Solution

  • The t3sbootstrap extension offers two methods for managing custom SCSS properties:

    1. Storing in fileadmin:
      • Location: fileadmin/T3SB/Resources/Public/T3SB-SCSS/
    2. Storing in the t3sb_package Extension:
      • Location: EXT:t3sb_package/Resources/Public/T3SB-SCSS/

    In order to activate the second option :

    • Enable Custom SCSS: In Config/System/settings.php, set customScss = 1 and sitepackage = 1.
    • Execute t3sbootstrap:cdnToLocal cron job in order to move JS and CSS files from CDN to local [ under t3sb_package extension ].
    • Edit custom.scss and custom-variables.scss files under EXT:t3sb_package/Resources/Public/T3SB-SCSS/ folder as needed.
    • Clean up temporary files located at typo3temp/assets/t3sbootstrap/css/.
    • Clear Backend Caches.

    Important Notes:

    • Custom SCSS files must be named custom.scss and custom-variables.scss to be recognized.
    • If you want to include additional SCSS files from a custom extension (e.g., my_sitepackage), you must @import your SCSS into the t3sb_package custom SCSS files. Without this, your custom SCSS will not be applied.