- From: Sebastian Zartner via GitHub <noreply@w3.org>
- Date: Sun, 15 Mar 2026 06:37:02 +0000
- To: public-css-archive@w3.org
@johannesodland CamelCase is considered a [mistake](https://wiki.csswg.org/ideas/mistakes/#:~:text=currentColor%20keyword%20should%20have%20retained%20the%20dash). So the keyword in your `time()` function should rather be `current-time`, or to be more precise, `current-timestamp`, or just `now`. And the `timeOfDay()` function should be called `time-of-day()`, following that rule. Though since it refers to the current day as the animation timeline, it might just be called `day()`. And that might even be generalized to a `timespan()` function that takes two timestamps or some predefined keywords for the current day and other common time spans. Also, your use of `<time>` seems to be different from the [existing `<time>` data type](https://drafts.csswg.org/css-values/#time), as it reflects a point in time rather than a duration. Therefore it should rather be called something like `<timestamp>`, `<point-in-time>`, or `<date-time>`. (And maybe `<time>` should be renamed to `<duration>`.) So to iterate on the initial proposal, the concrete additions would be: * a `day-of-year()` function that returns a `<number>` value referencing the number of the current day within a year. * a `<timestamp>` data type that refers to a specific point in time and includes the `current-time` keyword. * a `now` keyword that represents the current timestamp. * a `time()` function that can be used in conditions to compare two `<timestamp>` values. * a `timespan()` function for `animation-timeline` that defines a timespan to be used as the animation timeline, referred to as a new `<timespan>` data type, which either takes two `<timestamp>` values or a keyword like `current-day`. (It might even allow to do calculations, meaning a `<timestamp>` value plus or minus a `<time>` value, but that probably also requires to extend `<time>` to take other values than seconds and milliseconds.) With the above, I think this proposal should probably be split into multiple issues so they can be discussed separately with the media query part maybe being merged with #9710. Sebastian -- GitHub Notification of comment by SebastianZ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13655#issuecomment-4062388539 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 15 March 2026 06:37:03 UTC