Aw: New CSS parser for JavaFX

2024-09-01 Thread Marius Hanl
quot; : I've written up a proposal to implement a new CSS parser for JavaFX: https://gist.github.com/mstr2/f416996caf48e11193f0b6a5883a3926 The goal is not add new features at this point, but to resolve some long-standing issues with the existing CSS parsing (though if you read

Re: New CSS parser for JavaFX

2024-08-26 Thread Michael Strauß
> > 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 whi

Re: New CSS parser for JavaFX

2024-08-26 Thread Michael Strauß
I don't think that's practical, as the proposed enhancement will change parsing, representation (Declaration, ParsedValue) and runtime processing (CssStyleHelper). I don't know how we would keep the old implementations around. On Tue, Aug 27, 2024 at 12:01 AM Andy Goryachev wrote: > > I wonder i

Re: New CSS parser for JavaFX

2024-08-26 Thread Michael Strauß
On Mon, Aug 26, 2024 at 11:14 PM John Hendrikx wrote: > > The CSS code, and its API, to put it diplomatically, is IMHO a bit under > cooked. > > I've had quite a few looks at it, and each time I've come to the > conclusion that it is near impossible to do any worthwhile improvements > to it withou

Re: New CSS parser for JavaFX

2024-08-26 Thread Michael Strauß
It's certainly true that CSS is a fragile area, but I would argue that one of the reasons it's fragile is because the implementation is a bit unsound in many places. Cleaning up tech debt could make this progressively more robust in the long run. Note that I'm also not proposing a refactor to make

Re: New CSS parser for JavaFX

2024-08-26 Thread Andy Goryachev
see inline > can we create stylesheets programmatically without parsing (i.e. construct > the token tree directly)? Maybe, but `Stylesheet` and its constituent classes really seem like exposed implementation details of JavaFX. I would rather deprecate their use and remove them from the public AP

Re: New CSS parser for JavaFX

2024-08-26 Thread Andy Goryachev
I wonder if this could be done as an incubator module, or hidden behind an experimental system property. -andy From: openjfx-dev on behalf of Kevin Rushforth Date: Monday, August 26, 2024 at 14:40 To: [email protected] Subject: Re: New CSS parser for JavaFX Deprecating the existing

Re: New CSS parser for JavaFX

2024-08-26 Thread Kevin Rushforth
Deprecating the existing API is an interesting idea, but with such a large API surface it will be difficult to show that no application is using it. -- Kevin On 8/26/2024 2:35 PM, John Hendrikx wrote: On 26/08/2024 22:42, Michael Strauß wrote: can we create stylesheets programmatically with

Re: New CSS parser for JavaFX

2024-08-26 Thread John Hendrikx
On 26/08/2024 22:42, Michael Strauß wrote: can we create stylesheets programmatically without parsing (i.e. construct the token tree directly)? Maybe, but `Stylesheet` and its constituent classes really seem like exposed implementation details of JavaFX. I would rather deprecate their use and

Re: New CSS parser for JavaFX

2024-08-26 Thread Kevin Rushforth
[email protected]> *Date: *Sunday, August 25, 2024 at 20:45 *To: *openjfx-dev <mailto:[email protected]> *Subject: *New CSS parser for JavaFX I've written up a proposal to implement a new CSS parser for JavaFX: https://gist.github.com/mstr2/f416996ca

Re: New CSS parser for JavaFX

2024-08-26 Thread John Hendrikx
(100 50 0 )" (rgb instead of gray) ? On 26/08/2024 05:44, Michael Strauß wrote: I've written up a proposal to implement a new CSS parser for JavaFX: https://gist.github.com/mstr2/f416996caf48e11193f0b6a5883a3926 The goal is not add new features at this point, but to resolve some

Re: New CSS parser for JavaFX

2024-08-26 Thread Michael Strauß
> can we create stylesheets programmatically without parsing (i.e. construct > the token tree directly)? Maybe, but `Stylesheet` and its constituent classes really seem like exposed implementation details of JavaFX. I would rather deprecate their use and remove them from the public API eventually

Re: New CSS parser for JavaFX

2024-08-26 Thread Andy Goryachev
e applicable, but it certainly does not help. -andy From: openjfx-dev on behalf of Kevin Rushforth Date: Monday, August 26, 2024 at 11:52 To: [email protected] Subject: Re: New CSS parser for JavaFX Lots of things might be good ideas. I'm rather skeptical of the cost / benefit

Re: New CSS parser for JavaFX

2024-08-26 Thread Kevin Rushforth
S and FX-style CSS? * what is the testing strategy? Thank you -andy *From: *openjfx-dev on behalf of Michael Strauß *Date: *Sunday, August 25, 2024 at 20:45 *To: *openjfx-dev *Subject: *New CSS parser for JavaFX I've written up a proposal to implement a new CSS parser f

Re: New CSS parser for JavaFX

2024-08-26 Thread Andy Goryachev
ategy? Thank you -andy From: openjfx-dev on behalf of Michael Strauß Date: Sunday, August 25, 2024 at 20:45 To: openjfx-dev Subject: New CSS parser for JavaFX I've written up a proposal to implement a new CSS parser for JavaFX: https://gist.github.com/mstr2/f416996caf48e11193f0b6a5883a3926

New CSS parser for JavaFX

2024-08-25 Thread Michael Strauß
I've written up a proposal to implement a new CSS parser for JavaFX: https://gist.github.com/mstr2/f416996caf48e11193f0b6a5883a3926 The goal is not add new features at this point, but to resolve some long-standing issues with the existing CSS parsing (though if you read carefully, you might