Automatic update from web-platform-tests [Gap Decorations]: Disentangle resolved -width values from -style This CL decouples the resolved value of outline-width and column-rule-width from their corresponding *-style properties. The second part of the CSSWG resolution[1], stipulates that the resolved value for these properties should now be independent of the *-style. Most file changes in this CL involve updating tests to reflect this new behavior. To simplify reverting in the case of a web compat issue, a virtual test suite with the flag disabled and relevant tests as base has been set up. A subsequent CL will be put up to set up use counters to evaluate potential web compat risks associated with this change [1]: https://github.com/w3c/csswg-drafts/issues/11494#issuecomment-2675800489 Bug: 393631108 Change-Id: I241d253b14493f45dc6b143286bfa031261fac27 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6909751 Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com> Commit-Queue: Sam Davis Omekara <samomekarajr@microsoft.com> Reviewed-by: Alison Maher <almaher@microsoft.com> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1516261} -- wpt-commits: 7f15bbaf0b6d43a99ba964e42649bc3878e9b819 wpt-pr: 54881
106 lines
2.4 KiB
HTML
106 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<meta charset="UTF-8">
|
|
<title>column-rule-width interpolation</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#crw">
|
|
<meta name="assert" content="column-rule-width supports animation by computed value type">
|
|
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/interpolation-testcommon.js"></script>
|
|
|
|
<style>
|
|
.parent {
|
|
column-rule-width: 30px;
|
|
}
|
|
.target {
|
|
column-rule-width: 10px;
|
|
}
|
|
</style>
|
|
|
|
<body></body>
|
|
|
|
<script>
|
|
test_interpolation({
|
|
property: 'column-rule-width',
|
|
from: neutralKeyframe,
|
|
to: '20px',
|
|
}, [
|
|
{at: -0.3, expect: '7px'},
|
|
{at: 0, expect: '10px'},
|
|
{at: 0.3, expect: '13px'},
|
|
{at: 0.6, expect: '16px'},
|
|
{at: 1, expect: '20px'},
|
|
{at: 1.5, expect: '25px'},
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'column-rule-width',
|
|
from: 'initial',
|
|
to: '20px',
|
|
}, [
|
|
{at: -0.3, expect: '0px'},
|
|
{at: 0, expect: '3px'},
|
|
{at: 0.3, expect: '8.1px'},
|
|
{at: 0.6, expect: '13.2px'},
|
|
{at: 1, expect: '20px'},
|
|
{at: 1.5, expect: '28.5px'},
|
|
]);
|
|
|
|
// column-rule-width: inherit on .target means 30px (from .parent)
|
|
// so we are interpolating from 30px to 20px here. column-rule-width is
|
|
// now independent of column-rule-style, so we won't be interpolating
|
|
// from 0px to 20px as before.
|
|
test_interpolation({
|
|
property: 'column-rule-width',
|
|
from: 'inherit',
|
|
to: '20px',
|
|
}, [
|
|
{at: -0.3, expect: '33px'},
|
|
{at: 0, expect: '30px'},
|
|
{at: 0.3, expect: '27px'},
|
|
{at: 0.6, expect: '24px'},
|
|
{at: 1, expect: '20px'},
|
|
{at: 1.5, expect: '15px'},
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'column-rule-width',
|
|
from: 'unset',
|
|
to: '20px',
|
|
}, [
|
|
{at: -0.3, expect: '0px'},
|
|
{at: 0, expect: '3px'},
|
|
{at: 0.3, expect: '8.1px'},
|
|
{at: 0.6, expect: '13.2px'},
|
|
{at: 1, expect: '20px'},
|
|
{at: 1.5, expect: '28.5px'},
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'column-rule-width',
|
|
from: '0px',
|
|
to: '10px'
|
|
}, [
|
|
{at: -0.3, expect: '0px'}, // CSS column-rule-width can't be negative.
|
|
{at: 0, expect: '0px'},
|
|
{at: 0.3, expect: '3px'},
|
|
{at: 0.6, expect: '6px'},
|
|
{at: 1, expect: '10px'},
|
|
{at: 1.5, expect: '15px'}
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'column-rule-width',
|
|
from: '15px',
|
|
to: 'thick'
|
|
}, [
|
|
{at: -2, expect: '35px'},
|
|
{at: -0.3, expect: '18px'},
|
|
{at: 0, expect: '15px'},
|
|
{at: 0.3, expect: '12px'},
|
|
{at: 0.6, expect: '9px'},
|
|
{at: 1, expect: '5px'},
|
|
{at: 1.5, expect: '0px'}
|
|
]);
|
|
</script>
|