diff options
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/UI/WebControls/TStyleSheet.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/Web/UI/WebControls/TStyleSheet.php b/framework/Web/UI/WebControls/TStyleSheet.php index e5b6ac6d..02ac40cd 100644 --- a/framework/Web/UI/WebControls/TStyleSheet.php +++ b/framework/Web/UI/WebControls/TStyleSheet.php @@ -66,10 +66,12 @@ class TStyleSheet extends TControl */ public function render($writer) { - $textWriter=new TTextWriter; - parent::renderChildren(new THtmlWriter($textWriter)); - if(($css=trim($textWriter->flush()))!=='') - $writer->write("<style type=\"text/css\">\n/*<![CDATA[*/\n{$css}\n/*]]>*/\n</style>\n"); + if($this->getHasControls()) + { + $writer->write("<style type=\"text/css\">\n/*<![CDATA[*/\n"); + $this->renderChildren($writer); + $writer->write("\n/*]]>*/\n</style>\n"); + } } } |