Contact [email protected], [email protected]

Explainerhttps://css.oddbird.net/toggles/explainer/

Specificationhttps://tabatkins.github.io/css-toggle/

Summary

CSS toggles are a mechanism for associating toggleable state with a DOM
element. This state can be defined and connected to activations through CSS
properties, and can be queried in CSS selectors. This provides a
declarative mechanism for specifying state that describes behaviors like
the existing HTML behaviors for checkboxes or radio buttons.

Blink componentBlink>DOM
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EDOM>

Motivation

There are many cases where a user interaction (such as a click) toggles
state that styles depend on. These cases include popups, tabs, carousels,
accordions, and toggles controlling light/dark mode. Building these today
requires Javascript. We would like to build a declarative way of doing this
that, if we do it right, will be easier for developers to use, faster, and
more accessible than the solutions that are used today.

Additional context

I'd like to emphasize that this intent to prototype really is an intent to
*prototype*. The goal here is to build an implementation that can be used
to guide the design of this feature (by giving those involved an
implementation to test), not to build something that we'd like to ship
quickly.


Before we would consider shipping something in this space, we would (among
other things) want to do further testing to validate that the result *is*
more accessible than what people use today (or learn that we need to build
in more distinctions that can be reflected into accessibility roles), and
do additional development of the things that we hope can be built on top of
toggles to validate that it works as a primitive.

Initial public proposalhttps://github.com/w3c/csswg-drafts/issues/6991

TAG review
https://github.com/w3ctag/design-reviews/issues/730

TAG review statusPending (just filed)

Risks

Interoperability and Compatibility
Gecko: No signal

WebKit: No signal

Web developers: No direct signals, but what kicked off the original designs
here was OpenUI work around tabs (see, e.g.,
https://open-ui.org/components/tabs.research ).

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that
it has potentially high risk for Android WebView-based applications?

No.



Debuggability

New CSS properties and CSS selectors should be debuggable in the same way
that all existing properties and selectors are. If this turns into
something that we want to ship, we will probably want to add additional
devtools support for understanding the underlying toggle states, but we
don't want to do so this early in the prototyping process.

Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>
?No, though I plan to add tests as I write the code

Flag nameCSSToggles

Requires code in //chrome?False

Tracking bughttps://bugs.chromium.org/p/chromium/issues/detail?id=1250716

Estimated milestones

No milestones specified

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5072281125519360

This intent message was generated by Chrome Platform Status
<https://chromestatus.com/> and then edited by hand.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3hE3gnQQNHTD7hT-jukBYFgwTXbYZQWSS1iJVXn9J7iyg%40mail.gmail.com.

Reply via email to