CSS: Add class no-icon to menu items w/o an icon

refs #5543
This commit is contained in:
Eric Lippmann 2015-10-01 02:51:46 +02:00
parent 591ccd0378
commit 968754ec2e
1 changed files with 5 additions and 0 deletions

View File

@ -318,6 +318,11 @@ class NavigationRenderer implements RecursiveIterator, NavigationRendererInterfa
$cssClasses[] = static::CSS_CLASS_ACTIVE; $cssClasses[] = static::CSS_CLASS_ACTIVE;
} }
if ($item->getIcon() === null) {
// @TODO(el): Add constant
$cssClasses[] = 'no-icon';
}
if ($cssClass = $item->getCssClass()) { if ($cssClass = $item->getCssClass()) {
$cssClasses[] = $cssClass; $cssClasses[] = $cssClass;
} }