Is it possible to remove or unset a particular stylesheet that’s been appended?
eg:
<?php
// my layout file
$this->headLink()
->appendStylesheet('/css/page/foo.css');
?>
Often i’ve appended stylesheets or added stylesheets but now i don’t need in the view script for a particular context. Is this possible?
Pretty much your options with the current api is to overwrite the whole
headLink()stack by callingsetStyleSheet()in your controller/action/view.Another option would be to refactor and only add certain stylesheets when need for specific action/views.
I do believe that most people would just let it be, as the extra few bits a stylesheet consumes is usually not worth the cpu cycles to remove it.