On Mon, 12 Oct 2026 21:47:08 GMT, Marius Hanl <[email protected]> wrote:
>>> > Well, you can `bind` a property... good luck setting it then. >>> > Never quite understood why it was decided that in the CSS system, `set` >>> > and `bind` aren't the ultimate truth, but can be overridden by the users >>> > own stylesheet (but not the user agent stylesheet). >>> > I mean `USER` in browser terminology means the browser user (browsers >>> > allow for stylesheets set directly by the end user, that fit between the >>> > browsers own default look (`USER_AGENT`) and the website developers look >>> > (`AUTHOR`). >>> > However, in JavaFX, `USER` has been conflated with application >>> > developer... it should have been the end user. >>> >>> 100% agree. This behavior is very confusing and feels just wrong. >> >> There have been previous discussions on the mailing list and in JBS about >> the wrong ordering. Setting a property from the code should override CSS, >> but it's the other way around. In my opinion the ordering should be fixed, >> but it will break the current behavior. > >> btw, will this scenario work if the css changes pseudostyle? > > probably not, thats why setting a value sometimes looks like you overwrite > the style, while in reality the next real css apply will change it back again > (and thats why binding is actually a valid way to force a style to not get > overwritten by CSS). well, it does not. I cannot show you the test but basically do this: 1. use a pseudoclass to change the property 2. make the property not settable 3. remove the pseudoclass 4. make the property settable 5. reapply, and remove the same style ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2343#discussion_r4252742168
