You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We smooth out the first 20% to account for application code and unit tests loading, as well as for the first whole second we run tests synchronously back-to-back for maximum throughput, which means the above style write doesn't (and shouldn't, this is a good thing!) get applied to rendering until we yield anyway. When running non-headless, we yield about once every whole second.
The above works reasonably well when @starting-style is supported. However, when it isn't supported, it would start statically at 20% and sit still for a whole second. As a fallback I'd like to set the initial value to 0% when it isn't supported, and let the first test yield point set it to 20% which then utilizes the transition. Like so:
Unfortunately, this effectively cancels out @starting-style because it means it will "start" at 0% and goes to 0%, which is the same as only having the fallback, which means the first second no progress appears to happen until the first yield point.
https://drafts.csswg.org/css-conditional-4/
https://drafts.csswg.org/css-transitions-2/
This renders orange in Firefox/Safari/Chrome despite the latter two supporting it.
Use case
I'm styling the QUnit progress bar.
In JavaScript, each test does something like the folowing:
We smooth out the first 20% to account for application code and unit tests loading, as well as for the first whole second we run tests synchronously back-to-back for maximum throughput, which means the above style write doesn't (and shouldn't, this is a good thing!) get applied to rendering until we yield anyway. When running non-headless, we yield about once every whole second.
The above works reasonably well when
@starting-style
is supported. However, when it isn't supported, it would start statically at 20% and sit still for a whole second. As a fallback I'd like to set the initial value to 0% when it isn't supported, and let the first test yield point set it to 20% which then utilizes the transition. Like so:Unfortunately, this effectively cancels out
@starting-style
because it means it will "start" at 0% and goes to 0%, which is the same as only having the fallback, which means the first second no progress appears to happen until the first yield point.Demo: https://codepen.io/Krinkle/pen/JjQWdoe
Might be related:
@custom-media
inside@supports
or add@custom-supports
#6611The text was updated successfully, but these errors were encountered: