Closed velosipedist closed 12 years ago
Use CClientSript::registerLinkTag() / CHtml::linkTag()
instead. CHtml::cssFile()
should register only css stylesheets.
It won't allow to include .less sources to packages and keep styles dependencies, add .less assets. I'm already writing CClientScript & CHtml solution in my own issue branch.
CHtml::cssFile()
or CClientSript::registerCssFile()
should not be changed because method name clearly states that it works with CSS only.
CClientSript::registerCssFile()
can only register 'text/css' files cause ofCHtml::cssFile()
can only register hardcoded 'text/css' type. Also there is no possibility to change or add any other attributes. This is not good:DRY
CHtml::tag()
feature is ignored. Is there any reason for outputting plain HTML tag that way?Meanwhile, we cannot use non-css stylesheets (for example, .less) in packages or just with
CClientSript::registerCssFile()
.My proposal is to change
CHtml::cssFile()
signature to following: