Support :focus-visible CSS pseudoclass
Kevin Rushforth
kevin.rushforth at oracle.com
Tue Jun 8 21:40:06 UTC 2021
Thanks to Tom and Pedro for their replies. That's good to know.
Michael: It does sound like this is a generally useful feature to do in
the near future, so it makes sense to proceed with the review. I presume
that the API as you have described it in the JBS description is what you
are currently proposing? If so, I'll take a look at the API + docs in
the next couple of days and we can take it from there.
As with any non-trivial feature, we won't rush it in -- it will go in
when it's ready -- so it may already be too late for JavaFX 17,
especially given the care that needs to be taken for any new CSS
feature, and the number of other things in flight for JavaFX 17.
-- Kevin
On 6/7/2021 11:55 PM, Tom Schindl wrote:
> Hi,
>
> As an application developer I highly appreciate this built-in CSS
> support.
>
> We had to roll our own version for focus-visible and focus-within when
> implementing our custom controls and L&F but we would leverage this
> built-in support to remove complexity from our codebase.
>
> Beside Microsofts new L&F many Web-UI-Toolkits use this
> focus-visible-feature (and emulate it while not all browsers support it).
>
> How we use focus-visible:
> ------------------------
> I think focus-visible has a fairly narrow scope so we use it to show
> input focus differently depending on the way an element got focused
> (mainly mouse-activation vs rest)
>
> How we use focus-within:
> ------------------------
> We use focus-within to visiually indicate the area the focus is
> currently in by changing by lifting or coloring that area.
>
> Tom
>
> Am 08.06.21 um 01:08 schrieb Kevin Rushforth:
>> I'd be interested in hearing from application developers as to
>> whether and how they would use such a feature. As with all
>> non-trivial features, we don't want to do it if only one or two
>> developers are asking for it. This seems a reasonably new CSS
>> feature; Firefox just added support in FF 85 released earlier this
>> year and Safari still doesn't. That suggests it might be a bit early
>> to adopt this for JavaFX.
>>
>> Also, one thing that isn't clear is whether there would be any user
>> visible change using the standard themes. I presume that the answer
>> is "no", meaning that unless your stylesheets do anything with
>> focus-visible, it will not affect the look and feel of the app. That
>> should be stated explicitly
>>
>> I also presume that there would be no application visible changes
>> when using the standard themes, other than the presence of the two
>> new read-only boolean properties?
>>
>> -- Kevin
>>
>>
>> On 6/7/2021 3:46 PM, Michael Strauß wrote:
>>> I have expanded the scope of the proposal to include the :focus-within
>>> pseudo-class, which completes the set of focus-related pseudo-classes.
>>>
>>> The updated text of the proposal can be found in the JBS ticket:
>>> https://bugs.openjdk.java.net/browse/JDK-8268225
>>>
>>> I'm looking forward to comments.
>>
More information about the openjfx-dev
mailing list