<div dir="ltr">Perhaps I should have been clearer. I mentioned that example merely to make a point on how having a stylesheet set as an AUTHOR stylesheet can be a problem (Modena or a custom theme library like JMetro)  :-) . <br>It wasn't actually to create a new separate discussion.<div><br></div><div>As for the other discussion not exactly related to the one in this thread (having custom themes be user agent stylesheets) I think I have found a way to make multiple stylesheets be a user agent stylesheet.</div><div>That was my main problem as JMetro is composed of more than 1 stylesheet. I'm also doing it while still just using the javafx standard API. Thus far it's working except for some minor bugs (which I'm inclined to think are bugs in JavaFX itself).</div><div><br></div><div>Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2024 at 8:17 PM Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com">andy.goryachev@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8550802481382831472">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_-8550802481382831472WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">If your stylesheet defines the necessary variables, the "users" should be able to redefine them, correct?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">Or maybe allow for programmatic control of the stylesheet, similar to
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><a href="https://github.com/andy-goryachev/AppFramework/blob/7f74f58ecd4de239be923c4384e10142e48ade7c/src/goryachev/fx/FxFramework.java#L31" target="_blank">https://github.com/andy-goryachev/AppFramework/blob/7f74f58ecd4de239be923c4384e10142e48ade7c/src/goryachev/fx/FxFramework.java#L31</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><a href="https://github.com/andy-goryachev/AppFramework/blob/main/src/demo/appfw/Styles.java" target="_blank">https://github.com/andy-goryachev/AppFramework/blob/main/src/demo/appfw/Styles.java</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">Alternatively, we would need a new public API to allow you to do what you want how you want.  Perhaps if you could tell us about the problem you are trying to solve, exactly,
 and the APIs that are missing.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">-andy<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<div id="m_-8550802481382831472mail-editor-reference-message-container">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Pedro Duque Vieira <<a href="mailto:pedro.duquevieira@gmail.com" target="_blank">pedro.duquevieira@gmail.com</a>><br>
<b>Date: </b>Tuesday, July 9, 2024 at 12:00<br>
<b>To: </b>Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com" target="_blank">andy.goryachev@oracle.com</a>><br>
<b>Cc: </b><a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a> <<a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a>><br>
<b>Subject: </b>Re: [External] : Re: CSS Lookups and their origins (possible regression)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16";color:rgb(80,0,80)">>> </span><span class="m_-8550802481382831472m-256183579323412949apple-converted-space"><span style="font-size:12pt;color:rgb(33,33,33)"> </span></span><span style="font-size:12pt;color:rgb(33,33,33)">That's why
 now in the new theme I'm creating I'm setting everything to be an user agent stylesheet.</span><span style="font-size:12pt;color:rgb(80,0,80)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;color:rgb(33,33,33)"> </span><span style="font-size:12pt;color:rgb(80,0,80)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">> and this is probably the right approach.</span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt">Correct. That's why I agree with John and why the current behavior is likely undesired. :-)<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">On Tue, Jul 9, 2024 at 7:40</span><span style="font-size:12pt;font-family:Arial,sans-serif"> </span><span style="font-size:12pt">PM Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com" target="_blank">andy.goryachev@oracle.com</a>>
 wrote:<u></u><u></u></span></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">>
</span><span class="m_-8550802481382831472m-256183579323412949apple-converted-space"><span style="font-size:12pt;color:rgb(33,33,33)"> </span></span><span style="font-size:12pt;color:rgb(33,33,33)">That's why now in the new theme I'm creating I'm setting everything to be an user agent stylesheet.</span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;color:rgb(33,33,33)"> </span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">and this is probably the right approach.</span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""> </span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">-andy</span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""> </span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""> </span><span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16""> </span><span style="font-size:12pt"><u></u><u></u></span></p>
<div id="m_-8550802481382831472m_-256183579323412949mail-editor-reference-message-container">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">openjfx-dev <<a href="mailto:openjfx-dev-retn@openjdk.org" target="_blank">openjfx-dev-retn@openjdk.org</a>> on behalf of Pedro Duque Vieira <<a href="mailto:pedro.duquevieira@gmail.com" target="_blank">pedro.duquevieira@gmail.com</a>><br>
<b>Date: </b>Tuesday, July 9, 2024 at 11:28<br>
<b>To: </b><a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a> <<a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a>><br>
<b>Subject: </b>Re: [External] : Re: CSS Lookups and their origins (possible regression)</span><span style="font-size:12pt"><u></u><u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Hi guys,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"> <u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt">I agree with John Hendrikx on this.<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">The thing is not that you override the "css variable" value but that you end up overriding the priority of the rules in Modena which the developer
 won't likely want to.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">One other thing I'd add is that developers also like to use css themselves. If modena rules suddenly start to have the priority of AUTHOR this becomes
 much harder. They have to make their rules always more specific than Modena's that now have increased priority besides the fact that they need to be aware that this is actually happening and is the problem (in my experience many developers won't know this).<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">On a related note, I created a theme called JMetro. When implementing it I made it so that it was composed of author stylesheets (there wasn't a way
 to set it as a user agent stylesheet back when I started). That's also how 90% of themes work.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">However this is an issue as developers wanting to override styles set by JMetro will have a hard time figuring out how to make their rules specificity
 in their CSS higher than JMetro's so they get overridden (I've had complaints on this). That's why now in the new theme I'm creating I'm setting everything to be an user agent stylesheet.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Thanks,<br clear="all">
<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt"> <u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span class="m_-8550802481382831472m-256183579323412949gmailsignatureprefix"><span style="font-size:12pt">--
</span></span><span style="font-size:12pt"><u></u><u></u></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Pedro Duque Vieira (Duke) -
<a href="https://urldefense.com/v3/__https:/www.pixelduke.com__;!!ACWV5N9M2RV99hQ!NnLY0nSsEY93YxbhJsdC4TvA_CwObtH-KxcDs-JoCjZJZuX50rhGPjVRRbkZRNsLFo819RzmhmodWXd_NsA8s_UqbxTANLg$" target="_blank">
https://www.pixelduke.com</a><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:12pt"><br clear="all">
<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<p class="MsoNormal"><span class="m_-8550802481382831472gmailsignatureprefix"><span style="font-size:12pt">--
</span></span><span style="font-size:12pt"><u></u><u></u></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Pedro Duque Vieira (Duke) - <a href="https://urldefense.com/v3/__https:/www.pixelduke.com__;!!ACWV5N9M2RV99hQ!NnLY0nSsEY93YxbhJsdC4TvA_CwObtH-KxcDs-JoCjZJZuX50rhGPjVRRbkZRNsLFo819RzmhmodWXd_NsA8s_UqbxTANLg$" target="_blank">
https://www.pixelduke.com</a><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Duque Vieira (Duke) - <a href="https://www.pixelduke.com" target="_blank">https://www.pixelduke.com</a></div></div></div>