- From: Bramus via GitHub <noreply@w3.org>
- Date: Wed, 07 Jan 2026 16:14:41 +0000
- To: public-css-archive@w3.org
bramus has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-animations-2] Reconsider the property names of the timeline-trigger’s ranges (again). == In https://github.com/w3c/csswg-drafts/issues/13174#issuecomment-3666401670 we resolved on renaming the `timeline-trigger-range` + `timeline-trigger-exit-range` properties to `timeline-trigger-entry-range` + `timeline-trigger-active-range` respectively. I can’t shake the feeling that this was a mistake, probably because I didn’t properly express the arguments that were flying through my mind during the call … so here’s an extra (and final) attempt to have us reconsider the names. --- To jog y’alls memory, a trigger is a binary thing which is either inactive (untriggered) or active (triggered). For a trigger to become active, there is _something_ that activates it. For a trigger to become inactive, there is _something_ that deactivates it _(with stateless event triggers being the exception, they can’t become inactive once activated)_ For [event triggers](https://drafts.csswg.org/css-animations-2/#event-triggers) specifically, that activation can be something like a `pointerdown` event, and the deactivation – when it’s a stateful event trigger – can then be something like a `pointerup` event. For [timeline triggers](https://drafts.csswg.org/css-animations-2/#timeline-triggers), that activation happens when the scrolloffset is within a certain range, and the deactivation occurs when the scrolloffset is outside of a certain range. Both ranges can be the same, or they can be different as long as the second one is encompasses the first one. --- So, why do I think `entry` in `timeline-trigger-entry-range` is not a right fit? Well, there’s various reasons: - When I see the `timeline-trigger-active-range` property, I read it as the range in which the timeline-trigger remains active. So then `timeline-trigger-entry-range` is the range when the timeline-trigger is … _entry_? Doesn’t make sense. - It can be confused with the `entry` range from View Timelines, which is the range when a subject enters the scrollport in scroll-driven-animations. This `entry` range doesn’t have a lot to do with the “entry-range” of a timeline-trigger – as the latter can be something like `cover 50% exit 100%`. Additionally you can _“enter”_ that range from both sides. - This is over-indexing on the timeline aspect. Thinking a bit ahead, we will also need properties for event triggers … whose names are preferably consistent with the names we have for timeline triggers. There, we surely wouldn’t have a `event-trigger-`_`entry`_`-events` property but something more like a `event-trigger-`_`activation`_`-events` property (and a `event-trigger-deactivation-events` property as well for stateful event triggers). - Using `timeline-trigger-entry-range` does not map to the general description of triggers (see above) which makes it harder to explain than it is. I think you can understand that having to say _“When inside the entry range the trigger becomes active, but don’t let the word entry fool you because the range is not tied to the view timeline’s named entry range.”_ is a lot more complicated than _“The trigger becomes active when inside the activation range”_. I’ve successfully talked to a subset of authors (namely some of the GDEs) using the activation and active terminology from what I could tell they immediately got it. - It isn’t the act of _entering_ the range that activates the trigger, it’s when being inside of it. For example, when using an activation range of `scroll 0% scroll 100%` (which is the entire scrollable range) you simply “are” within that range on page load, without ever having crossed one of its offsets (which is the act of _“entering”_) As you can see I think more than one thing is off here … which is quite the red flag to me. --- So, what would make a good name for these properties? I believe good names have the following traits: - They map to the general description of what triggers are - It’s clear from the name what they do _(Cfr. [12.4 of the Web Platform Design Principles](https://www.w3.org/TR/design-principles/#naming-future-proofing))_ - The consider the whole picture (i.e. all triggers, instead of just its one trigger) - They are consistently(ish) named across all sorts of triggers _(Cfr. [12.5 of the Web Platform Design Principles](https://www.w3.org/TR/design-principles/#naming-consistency))_ Lacking better ideas, that brings me back to the `timeline-trigger-activation-range` and `timeline-trigger-active-range` terminology for timeline-triggers, and `event-trigger-activation-events` and `event-trigger-deactivation-events` for event-triggers. During the original call, the case against using activation/active was made with the reasoning that authors might confuse the two because they are “too close together”. I think we are underestimating authors here, especially because the suggested names come from how you’d generally speak about triggers. I mean, if they can understand how a physical light switch works – which I believe any of us using a computer does – then they already know the concepts of activating/deactivating and active/inactive. _(FWIW: We also have `scrollable` and `scrolled` keywords for state queries that are “close together”, yet they are very clearly named which – I think – makes it fine as it is)_ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13307 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 7 January 2026 16:14:42 UTC