[External] : Re: CSS Lookups and their origins (possible regression)
Andy Goryachev
andy.goryachev at oracle.com
Tue Jul 9 19:17:01 UTC 2024
If your stylesheet defines the necessary variables, the "users" should be able to redefine them, correct?
Or maybe allow for programmatic control of the stylesheet, similar to
https://github.com/andy-goryachev/AppFramework/blob/7f74f58ecd4de239be923c4384e10142e48ade7c/src/goryachev/fx/FxFramework.java#L31
https://github.com/andy-goryachev/AppFramework/blob/main/src/demo/appfw/Styles.java
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.
-andy
From: Pedro Duque Vieira <pedro.duquevieira at gmail.com>
Date: Tuesday, July 9, 2024 at 12:00
To: Andy Goryachev <andy.goryachev at oracle.com>
Cc: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: Re: [External] : Re: CSS Lookups and their origins (possible regression)
>> That's why now in the new theme I'm creating I'm setting everything to be an user agent stylesheet.
> and this is probably the right approach.
Correct. That's why I agree with John and why the current behavior is likely undesired. :-)
On Tue, Jul 9, 2024 at 7:40 PM Andy Goryachev <andy.goryachev at oracle.com<mailto:andy.goryachev at oracle.com>> wrote:
> That's why now in the new theme I'm creating I'm setting everything to be an user agent stylesheet.
and this is probably the right approach.
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org<mailto:openjfx-dev-retn at openjdk.org>> on behalf of Pedro Duque Vieira <pedro.duquevieira at gmail.com<mailto:pedro.duquevieira at gmail.com>>
Date: Tuesday, July 9, 2024 at 11:28
To: openjfx-dev at openjdk.org<mailto:openjfx-dev at openjdk.org> <openjfx-dev at openjdk.org<mailto:openjfx-dev at openjdk.org>>
Subject: Re: [External] : Re: CSS Lookups and their origins (possible regression)
Hi guys,
I agree with John Hendrikx on this.
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.
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).
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.
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.
Thanks,
--
Pedro Duque Vieira (Duke) - https://www.pixelduke.com<https://urldefense.com/v3/__https:/www.pixelduke.com__;!!ACWV5N9M2RV99hQ!NnLY0nSsEY93YxbhJsdC4TvA_CwObtH-KxcDs-JoCjZJZuX50rhGPjVRRbkZRNsLFo819RzmhmodWXd_NsA8s_UqbxTANLg$>
--
Pedro Duque Vieira (Duke) - https://www.pixelduke.com<https://urldefense.com/v3/__https:/www.pixelduke.com__;!!ACWV5N9M2RV99hQ!NnLY0nSsEY93YxbhJsdC4TvA_CwObtH-KxcDs-JoCjZJZuX50rhGPjVRRbkZRNsLFo819RzmhmodWXd_NsA8s_UqbxTANLg$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240709/5952b3d3/attachment-0001.htm>
More information about the openjfx-dev
mailing list