Re: CSS: style leaks from unrelated stylesheet

2014-10-09 Thread Tom Eugelink
Nope, that's not it. :-( In fact commenting out the getUserAgentStylesheet and just relying on the static initializer (checking it actuelly gets executed) results in the well known "The -fx-skin property has not been defined bla bla", while that value is there. The TestFX tests partially run;

Re: CSS: style leaks from unrelated stylesheet

2014-10-09 Thread David Grieve
Try calling StyleManager.getInstance().addUserAgentStylesheet(...) from a static initializer, like below. If that fixes your SVG arrow problem, then it is a good bet that this change is the cause of your issues. On 10/9/14, 10:23 AM, Tom Eugelink wrote: My controls in JFXtras have been overridi

Re: CSS: style leaks from unrelated stylesheet

2014-10-09 Thread Tom Eugelink
My controls in JFXtras have been overriding getUserAgentStylesheet from day 1 (or better JavaFX 2.0), AFAIK that is the way to do it. But I'm curious if this change is the cause of the CSS issues I'm seeing in 8U40. On 9-10-2014 15:27, David Grieve wrote: In 8u20 and before, adding a styles

Re: CSS: style leaks from unrelated stylesheet

2014-10-09 Thread Werner Lehmann
Thanks, David. This means I would always override getUserAgentStylesheet (for 8u20 on Control, for 8u40+ on Region). And selectors in the stylesheet should be sufficiently specific because only 8u40+ actually limits them to the declaring node. For the record, I'm not talking about controlsfx

Re: CSS: style leaks from unrelated stylesheet

2014-10-09 Thread David Grieve
In 8u20 and before, adding a stylesheet via Control.getUserAgentStylesheet will simply add the user-agent stylesheet to the entire scene, not just the control. This has been fixed in 8u40 where the getUserAgentStylesheet method is now public API on Region and the styles added will affect only t

Re: CSS: style leaks from unrelated stylesheet

2014-10-09 Thread Werner Lehmann
Turns out that the 3rd party control adds its stylesheet like this: class SomeControlSkin... static { StyleManager.getInstance().addUserAgentStylesheet(...) } In this way it is not only using private API but also the stylesheet is not associated with only such control nodes and therefor

CSS: style leaks from unrelated stylesheet

2014-10-09 Thread Werner Lehmann
Hi, I have a strange effect with stylesheets. Somehow a style is applied although the defining stylesheet is not in the scene. Consider this scenario: Primary stage with a 3rd party control. The control's jar file contains a stylesheet with style .list-cell { -fx-pref-height: 24; } Then