-
Bug
-
Resolution: Fixed
-
P2
-
8
This is cased but a bug in CSS cache for rules like
.table-view .column-header-background,
.tree-table-view > .column-header-background {
-fx-background-color: -fx-body-color;
-fx-padding: 0;
}
the cache only takes into account the set of rules that match a node, if two nodes have same set of rules they get the same cache result. in this case the first control create the cache entry and second control gets same cache entry. but the cache entry dosn't apply to the second node so it gets no styling. At least this is my understanding.
If you break apart rule to look like:
.table-view .column-header-background {
-fx-background-color: -fx-body-color;
-fx-padding: 0;
}
.tree-table-view > .column-header-background {
-fx-background-color: -fx-body-color;
-fx-padding: 0;
}
then it works fine.
.table-view .column-header-background,
.tree-table-view > .column-header-background {
-fx-background-color: -fx-body-color;
-fx-padding: 0;
}
the cache only takes into account the set of rules that match a node, if two nodes have same set of rules they get the same cache result. in this case the first control create the cache entry and second control gets same cache entry. but the cache entry dosn't apply to the second node so it gets no styling. At least this is my understanding.
If you break apart rule to look like:
.table-view .column-header-background {
-fx-background-color: -fx-body-color;
-fx-padding: 0;
}
.tree-table-view > .column-header-background {
-fx-background-color: -fx-body-color;
-fx-padding: 0;
}
then it works fine.
- duplicates
-
JDK-8126428 Last selector in the rule seems ignored
- Resolved