-
Notifications
You must be signed in to change notification settings - Fork 779
Description
In issue #11494, the computed value (but not the resolved or used value) for the border-width properties was changed to no longer take the associated border-style into account.
This new definition leads to a change in behavior for animations and transitions of border widths that I don't think is expected. (At least, I think that is the case. There is a lot to the animation specs, so I might have missed something, but it seems like computed values, not resolved or used values, are what are used in making animation decisions).
For example, an animation like:
@keyframes test {
from {
border-width: 3px;
border-style: none;
}
to {
border-style: solid;
border-width: 0px;
}
}previously would have been a no-op, but now should now cause a 1.5px border to pop-in half way through the animation (when the style transitions from none to solid), which gradually then animates down to 0px. (3px and none are picked as the initial state, since they are the default values).
Similarly, a CSS transition like:
.test {
transition: 1s ease-in-out;
}
.test:hover {
border-style: solid;
border-width: 0px;
}would previously have done nothing, but now will have the 1.5px border pop in half way through.
This has caused at least one regression reported to WebKit, https://bugs.webkit.org/show_bug.cgi?id=307933. (My plan is to use the resolved/used value of border-width for checking to see if a transition should trigger, to work around the issue for now. This appears to be what Firefox is doing, though I have not looked at the code to confirm).
My suggestion would be that we specify that border-width (and perhaps outline-width and column-rule-width) uses the resolved/used values for all animation and transition determinations,