Skip to content

Commit

Permalink
Don't specifically support LESS files but do permit custom relations …
Browse files Browse the repository at this point in the history
…for stylesheets.
  • Loading branch information
okonomiyaki3000 committed Nov 2, 2017
1 parent 849d1f7 commit b8e7a32
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libraries/src/Document/Renderer/Html/HeadRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@ public function fetchHead($document)
// Generate stylesheet links
foreach ($document->_styleSheets as $src => $attribs)
{
// Find the relation
$relation = isset($attribs['relation']) ? $attribs['relation'] : 'stylesheet';
$relation = ($relation == 'stylesheet' && \JFile::getExt($src) == 'less') ? 'stylesheet/less' : 'stylesheet';

// Check if stylesheet uses IE conditional statements.
$conditional = isset($attribs['options']) && isset($attribs['options']['conditional']) ? $attribs['options']['conditional'] : null;

Expand All @@ -174,6 +170,7 @@ public function fetchHead($document)
$buffer .= '<!--[if ' . $conditional . ']>';
}

$relation = isset($attribs['relation']) ? $attribs['relation'] : 'stylesheet';
$buffer .= '<link href="' . $src . '" rel="' . $relation . '"';

// Add script tag attributes.
Expand Down

0 comments on commit b8e7a32

Please sign in to comment.