On Wed, 8 Jan 2025 19:24:33 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> The CSS Selectors specification defines the `:root` pseudo-class that 
>> matches root nodes:
>> https://www.w3.org/TR/selectors-4/#the-root-pseudo
>> 
>> JavaFX uses the non-standard `.root` style class for the same purpose. We 
>> should also support the `:root` pseudo-class for increased compatibility of 
>> JavaFX CSS with the web specification.
>> 
>> Additionally, we should also support the following child-indexed 
>> pseudo-classes:
>> `:first-child`
>> `:last-child`
>> `:only-child`
>> `:nth-child()` with arguments `even` and `odd`
>> 
>> The `An+B [of S]?` microsyntax for `:nth-child()` is not supported, as this 
>> would require major changes in JavaFX CSS.
>
> Michael Strauß has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   move pseudo-class changes to end of onChanged

modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html line 
2059:

> 2057:           <th class="propertyname" scope="row">nth-child()</th>
> 2058:           <td>applies when the node is the n-th child in its 
> <code>Parent</code> container
> 2059:               (the only acceptable arguments are "even" and "odd")</td>

should we also specify that the numbering is 1-based?
i.e. the child at index 0 is the first (1st) and therefore `ODD`?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1652#discussion_r1907737494

Reply via email to