Search code examples
typo3typo3-9.xtx-news

Compile less in TYPO3


I want to customize the styles of tx_news, so I copied news-basics.less and news-basics.css into my site extension.

My environment is: TYPO3 9.5, Boostrap_package 11.0.2, tx_news 7.3.1

Now my question is what is the best practice to compile news-basics.less into news-basics.css? As bootstrap_package seems to include a scss compiler (maybe a less compiler too ?-), it would be nice to use it.


Solution

  • Yes, Bootstrap Package includes a LESS compiler (but will be removed in 12.x).

    Add e.g. the following lines to your setup TS and Bootstrap Package will compile it:

    page.includeCSS.news-basic = EXT:yoursitepackage/Resources/Public/Less/news-basic.less