W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

Re: [csswg-drafts] [css-color-5] Add `currentBackgroundColor` Variable (#5292)

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Nov 2020 16:49:41 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-725534121-1605113380-sysbot+gh@w3.org>
Assuming it works the same as custom properties in transitions and animations, @upsuper's proposal does cover my use cases. Do note that a (registered) custom property propagates correctly for both transitions and animations. See demo: https://codepen.io/leaverou/pen/WNxYBLe

> I love the extensibility behind this functional syntax for `current()` in @LeaVerou's proposal above. My only concern here would be that this might significantly increase overhead for implementors. For example, `current(background)` could be valid in many cases instead of `current(background-color)`, yet not always (i.e. if there are images and multiple backgrounds). That leaves it to the author to require more value management and overhead.

@una As I explained above, there is literally no additional implementation complexity with my syntax. The additional complexity that comes with adding more properties can be resolved when more properties are added, with the constraints of that time. Especially about shorthands, perhaps we should simply never add them (though as @upsuper pointed out, what happens with longhands that later become shorthands? In theory, even `background-color` could become a shorthand at some point in the future).

> If there's no possibly viable path to resolve the issues, its potential could just be an illusion, and it's going to become a tech debt in the spec people may regularly question about.

I'd be wary of making such statements about there being "no possibly viable path". Do you want me to list cases where we thought that certain features were impossible or difficult to implement, and then other changes made them feasible later?

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5292#issuecomment-725534121 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 11 November 2020 16:49:42 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC