<div dir="ltr">.. one more reason to use the CSS variable spec that I forgot to mention: <div> 5 - It's a spec that has been thoroughly thought of before it was added to CSS and it has stood the test of time.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2024 at 11:04 PM Pedro Duque Vieira <<a href="mailto:pedro.duquevieira@gmail.com">pedro.duquevieira@gmail.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 dir="ltr"><div>Andy, if I understand the suggestion correctly, you want to set the Modena sizes using variables that can be easily overridden. To that effect variables must first be able to hold numeric values as, as it stands today</div>JavaFX only allows colors to be used for CSS variables. <div>So, you're also suggesting adding the ability for CSS variables to define inset values, is that correct?<div><br></div><div>I think that's a good idea. I would, however, generalize that to allow CSS variables to hold numeric values that could be used anywhere. Or at least, starting to pave the ground for that.</div><div><br></div><div>I would go even further and start to pave ground to add the CSS variable spec into javafx css: <a href="https://codersblock.com/blog/what-can-you-put-in-a-css-variable/" target="_blank">https://codersblock.com/blog/what-can-you-put-in-a-css-variable/</a></div><div><br></div><div>Why use the css web spec? Because of the following reasons:</div><div>1 - Designers already know how to work with the css web spec</div><div>2 - there are already many tools available that work with the css web spec</div><div>3 - there are already many examples on the web using CSS so developers can just copy paste those examples</div><div>4 - Developers coming from the web can easily start using javafx css with no friction and no need to learn it</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2024 at 9:04 PM Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com" target="_blank">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>





<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Iosevka Fixed SS16"">Since we touched the modena.css, I would like to ask the group's opinion on whether we should fix the way modena.css sizes UI elements.  Please see
<a href="https://bugs.openjdk.org/browse/JDK-8314683" target="_blank">https://bugs.openjdk.org/browse/JDK-8314683</a> for reference, where changing the font size also unexpectedly changed the scrollbar.<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"">What do you think about introducing a set of variables similar to -fx-base but for sizing/padding, placing them early on to depend on the font size in the .root selector instead
 of the font in the actual control?  Something along the lines of<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 style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">.root {<u></u><u></u></span></p>
<p style="margin:0in;text-indent:0.5in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">-fx-size-3px: 0.25em;<u></u><u></u></span></p>
<p style="margin:0in;text-indent:0.5in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">...<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">}<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black"><u></u> <u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161)">.scroll-bar</span><span style="font-family:"Iosevka Fixed SS16";color:black">:horizontal
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(133,153,0)">></span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161)">.increment-button</span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(133,153,0)">></span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161)">.increment-arrow</span><span style="font-family:"Iosevka Fixed SS16";color:black"> {<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">    -fx-padding:
<span style="background:rgb(204,204,204)">-fx-size-3px</span> <span style="background:rgb(204,204,204)">
-fx-size-3px</span> <span style="background:rgb(204,204,204)">-fx-size-3px</span> <span style="background:rgb(204,204,204)">
-fx-size-3px</span>;<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">}<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black"><u></u> <u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">instead of
<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black"><u></u> <u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161)">.scroll-bar</span><span style="font-family:"Iosevka Fixed SS16";color:black">:horizontal
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(133,153,0)">></span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161)">.increment-button</span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(133,153,0)">></span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161)">.increment-arrow</span><span style="font-family:"Iosevka Fixed SS16";color:black"> {<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">    -fx-padding:
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(211,54,130);background:rgb(204,204,204)">0.333</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(203,75,22);background:rgb(204,204,204)">em</span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(211,54,130);background:rgb(204,204,204)">0.167</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(203,75,22);background:rgb(204,204,204)">em</span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(211,54,130);background:rgb(204,204,204)">0.333</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(203,75,22);background:rgb(204,204,204)">em</span><span style="font-family:"Iosevka Fixed SS16";color:black">
</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(211,54,130);background:rgb(204,204,204)">0.167</span><span style="font-family:"Iosevka Fixed SS16";color:rgb(203,75,22);background:rgb(204,204,204)">em</span><span style="font-family:"Iosevka Fixed SS16";color:black">;<span style="background:rgb(255,204,204)">
</span></span><span style="font-family:"Iosevka Fixed SS16";color:rgb(147,161,161);background:rgb(255,204,204)">/* 4 2 4 2 */</span><span style="font-family:"Iosevka Fixed SS16";color:black"><u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">}<u></u><u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black"><u></u> <u></u></span></p>
<p style="margin:0in;background:white"><span style="font-family:"Iosevka Fixed SS16";color:black">This way we still permit the UI components resize with the main font, while keeping the sizes of all the control surfaces consistent?<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"">This will require a trivial change in InsetsConverter.<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"">What do you think?<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>
</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>
</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>