From 30d02fc5f085af079620c56237d6f6524086f0f5 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 19 Jan 2016 21:50:13 +0000 Subject: [PATCH] Slightly increase specificity for higher precedence, allowing default colors if the category has no color --- phpgwapi/categories.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/categories.php b/phpgwapi/categories.php index 4e4071009a..dd5fed6b88 100644 --- a/phpgwapi/categories.php +++ b/phpgwapi/categories.php @@ -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']) {