Primefacesツリーテーブルのハイライト色をオーバーライドする方法はありますか?
動作しない例:
tr:hover {
background: #FF0000;
}
.ui-state-hover {
background: #FF0000;
}
.ui-widget-content:hover {
background: #FF0000;
}
.ui-state-highlight {
background: #FF0000;
}
Primefacesツリーテーブルのハイライト色をオーバーライドする方法はありますか?
動作しない例:
tr:hover {
background: #FF0000;
}
.ui-state-hover {
background: #FF0000;
}
.ui-widget-content:hover {
background: #FF0000;
}
.ui-state-highlight {
background: #FF0000;
}
このタイプの問題を次の方法で解決しました。
tr.ui-state-highlight .ui-widget-content{
color:white;
}
css-class を使用して、影響を受ける要素の量を最小限に抑えることはできるかもしれませんが、確実ではありません。=)
「!important」を使ってみましたか?
tr:hover {
background: #FF0000!important;
}
.ui-state-hover {
background: #FF0000!important;
}
.ui-widget-content:hover {
background: #FF0000!important;
}
.ui-state-highlight {
background: #FF0000!important;
}
これにより、自動生成された css など、同じものを呼び出す CSS が上書きされます。