Slightly increase specificity for higher precedence, allowing default colors if the category has no color

This commit is contained in:
Nathan Gray 2016-01-19 21:50:13 +00:00
parent 14041ccde4
commit 30d02fc5f0

View File

@ -36,7 +36,9 @@ foreach($categories as $cat)
{
if($cat['data']['color'])
{
$content .= ".cat_{$cat['id']} { background-color: {$cat['data']['color']};} /*{$cat['name']}*/\n";
// Use slightly more specific selector that just class, to allow defaults
// if the category has no color
$content .= "tr.cat_{$cat['id']}, div.cat_{$cat['id']}, span.cat_{$cat['id']} { background-color: {$cat['data']['color']};} /*{$cat['name']}*/\n";
}
if($cat['data']['icon'])
{