<div dir="auto"><div>> This means that `setStyle` wins over `getStyleSheets().add`, which wins<br>over a property set by the developer which wins over the default FX<br>Stylesheet.</div><div dir="auto"><br></div><div dir="auto">And binding a property wins even more.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sun, Dec 17, 2023, 16:49 John Hendrikx <<a href="mailto:john.hendrikx@gmail.com">john.hendrikx@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 16/12/2023 23:02, Mark Raynsford wrote:<br>
> On Sat, 2023-12-16 at 12:10 -0800, John Neffenger wrote:<br>
>> I would prefer not to have the tyranny of the project default<br>
>> replaced<br>
>> with a new tyranny of the app default. :-)<br>
>><br>
>> Wouldn't it be nice to allow developers and end users to enable<br>
>> hinting<br>
>> for any JavaFX application just by defining a system property?<br>
> That is a good point. I had forgotten that most applications don't<br>
> allow the user to specify their own CSS.<br>
><br>
> What's the expected precedence? I assume it's:<br>
><br>
> * If the CSS specifies a setting, and the corresponding property isn't<br>
> set, the CSS wins.<br>
> * If the property specifies a setting, and the CSS isn't set, the<br>
> property wins.<br>
> * If the CSS specifies a setting, and the corresponding property<br>
> specifies a setting, the property wins.<br>
<br>
It should be INLINE > AUTHOR > USER > USER_AGENT (see StyleOrigin)<br>
<br>
This means that `setStyle` wins over `getStyleSheets().add`, which wins <br>
over a property set by the developer which wins over the default FX <br>
Stylesheet.<br>
<br>
However, there is a bug there. If you set a property at any time, it <br>
will override the value. If however an Author Stylesheet CSS is applied <br>
afterwards, it will override the property again. It effectively makes <br>
AUTHOR and USER the same level, last one wins...<br>
<br>
--John<br>
<br>
</blockquote></div></div></div>