RFR: 8368166: Media query should accept multiple rules [v2]

Andy Goryachev angorya at openjdk.org
Tue Sep 23 16:28:50 UTC 2025


On Mon, 22 Sep 2025 23:52:21 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Given a media query with more than one rule:
>> 
>> 
>> @media (prefers-color-scheme: dark) {
>>     .foo1 {
>>         -fx-background-color: black;
>>     }
>>     .foo2 {
>>         -fx-background-color: white;
>>     }
>> }
>> 
>> 
>> The following CSS parser error is encountered: `Expected RBRACE`
>> 
>> The reason for this bug is that the CSS parser mistakenly expects that after the first rule was parsed, the media query should be terminated with a closing curly brace. This is obviously incorrect, the fix is relatively simple.
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
> 
>   emit error when closing curly brace is missing

Than you for updating the error message!

What are the numbers in square brackets?  Is it sufficient for the user to determine where the problem is?

For example, when I enter a single '{' in the monkey tester CSS Playground -> Custom CSS field, I get the following output:

`WARNING: CSS Error parsing '{: Expected RBRACE at [-1,-1]`

what does `[-1,-1]` refer to?

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1915#issuecomment-3324744582


More information about the openjfx-dev mailing list