在TYPO3中编译Less。

huangapple go评论59阅读模式
英文:

Compile less in TYPO3

问题

我想自定义tx_news的样式,所以我将news-basics.less和news-basics.css复制到我的网站扩展中。

我的环境是:TYPO3 9.5,Bootstrap_package 11.0.2,tx_news 7.3.1

现在我的问题是,如何最佳实践地将news-basics.less编译成news-basics.css?由于bootstrap_package似乎包含了一个scss编译器(也可能包含一个less编译器?),使用它会很不错。

英文:

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.

答案1

得分: 1

新闻扩展的模板和CSS并不真正准备好用于生产网站。我建议只需创建自定义CSS并将其包含在您的主CSS中。

英文:

The templates and css of news extension are not really meant to be fully ready for production sites. I propose to just create custom css and include that in your main css

答案2

得分: 1

是的,Bootstrap Package 包括一个 LESS 编译器(但将在 12.x 版本中移除)。

例如,将以下代码添加到您的设置 TS 中,Bootstrap Package 将对其进行编译:

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

英文:

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

huangapple
  • 本文由 发表于 2020年1月3日 14:56:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/59574383.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定