On 10 Sep 2020, at 10:20, Eric A. Meyer wrote:

There was a proposal at one point to create "cyclic" selection in CSS where you could alternate a property's values from one to another exactly as Jeff was hoping to do, but it was so long ago (and so ignored by browsers) that I can't remember the exact terms that were used to describe it, and so can't find any references online.

I asked on Twitter, and it turns out this wasn't so long ago after all-- it's part of the "CSS Values and Units Module Level 4" specification, last officially updated in 2019 but still under active development. It's called 'toggle()': <https://www.w3.org/TR/css-values-4/#toggle-notation>. Example 27 describes the exact scenario Jeff had in mind:

em { font-style: toggle(italic, normal); }


--
Eric A. Meyer - http://meyerweb.com/
______________________________________________________________________
css-discuss [css-d@css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to