New CSS parser for JavaFX

Michael Strauß michaelstrau2 at gmail.com
Mon Aug 26 22:52:42 UTC 2024


>
> I did not mean a specific class, but a stylesheet in general.  I just think that there should be a way to construct a stylesheet in memory that does not require parsing, and ideally with an option to do a limited type check.  Unless it significantly increases the overall effort, in which case the app can go the usual route of generating a data url.

In theory, this can work (just add a bunch of CSS tokens to a
javafx.css.Declaration). The problem is that you can't do anything
with a Stylesheet, there's no API for you to set it on a Scene or a
Parent. This would most likely be a separate enhancement and not part
of the CSS parser rework.

>
> Sorry for pointing out the obvious, the testing might represent overwhelming portion of the overall effort.  Not only we must ensure that any the legacy CSS continues to produce the same results, the new features work as expected, and all multiplied at least by 3 supported desktop platforms (or 5, if we count ios and android for mobile).

I agree, it will need to be well-tested.


More information about the openjfx-dev mailing list