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
{{ message }}
Repository navigation
Commit d6af4cc
Browse filesBrowse the repository at this point in the historyBrowse files
test(css): hold every lowering to the whole computed style, not the probes
The lowering tier compared the properties each fixture names. It now compares
every property the CSSOM reports for those elements, so a rewrite reaching one
nobody thought to probe is one the tier sees. Two differences it turned up are
real and now stated rather than hidden:
- a folded color serializes differently. Chromium keeps the space a color was
written in, so `color(srgb .2 .4 .6)` computes as itself where `#369` computes
as `rgb(51, 102, 153)` — the same color, a different string for a script to
read. Values are compared as the color they paint, which is what the rewrite
preserves.
- lowering `light-dark()` writes `--webpack-light` and `--webpack-dark`, which a
script enumerating computed custom properties would see where the source has
none. The fixtures naming that lowering now say so.
The corpus tier already reads every `.css` under `configCases` and compares the
CSSOM rule by rule — conditions evaluated rather than compared as text, blocks
computed by the engine — and every `style=""` as the declarations it parses to.
The queries and shorthand slots this session learned to shorten had no corpus
entry, so they were held by unit tests alone; they have one now.
"/*! declined: \`all\` on its own is the whole query, and \`only\` before it is there
61
+
tohidetherulefromanenginereadingCSS2's grammar */@media all{.t47b{color:red}}@media only all and (width>=100px){.t47c{color:red}}@media not all and (width>=100px){.t47d{color:red}}",
62
+
"/*! webpack: an operand a condition already states, whichever rule states it */@media (monochrome){.t47e{color:red}}@supports (display:grid){.t47f{color:red}}@supports ((display:grid) or (display:flex)){.t47g{color:red}}",
63
+
"/*! declined: a chain mixing the two operators is no flat list of either's, and
64
+
twoqueriesarenottwooperandsofanything*/@supports (display:grid) and (display:flex) or (display:table){.t47h{color:red}}@media (monochrome),(monochrome){.t47i{color:red}}",
58
65
"/*! webpack: a container query */@container card (width>400px){.t48{color:red}}",
59
66
"/*! webpack: an @supports condition */@supports (display:grid){.t49{color:red}}",
60
67
"/*! webpack: ...on a custom property */@supports (--x:1){.t50{color:red}}",
@@ -196,6 +203,10 @@ Array [
196
203
"/*! declined: ...but only then */.t96{transform:matrix3d(20,20,0,0,40,40,0,0,0,0,1,5,80,80,0,1)}",
197
204
"/*! webpack: a 2D pair of 1 leaves the z scale alone */.t97{transform:scaleZ(1.5)}",
198
205
"/*! webpack: a zero time keeps a unit, and \`s\` is the shorter one it can carry */.t98{transition-duration:0s}",
206
+
"/*! webpack: a shorthand slot holding its own initial goes, and a slot taking a
207
+
length or a color is read by the classes a sibling's own value is in — every
208
+
slot holding its initial leaves the shortest of them saying all of them */.t98a{border:none}.t98b{column-rule:none}.t98c{border:solidred}",
209
+
"/*! declined: a sibling filling the slot keeps the initial there */.t98d{border:medium 1px}.t98e{border:currentcolorred}",
199
210
"/*! webpack: a component spelling the property's own initial says nothing beside
200
211
another — omitting its group leaves exactly that keyword */.t99{grid-auto-flow:dense}",
201
212
"/*! declined: the other alternative of the group is not the initial */.t99a{grid-auto-flow:columndense}",
"/*! declined: \`all\` on its own is the whole query, and \`only\` before it is there
61
+
tohidetherulefromanenginereadingCSS2's grammar */@media all{.t47b{color:red}}@media only all and (width>=100px){.t47c{color:red}}@media not all and (width>=100px){.t47d{color:red}}",
62
+
"/*! webpack: an operand a condition already states, whichever rule states it */@media (monochrome){.t47e{color:red}}@supports (display:grid){.t47f{color:red}}@supports ((display:grid) or (display:flex)){.t47g{color:red}}",
63
+
"/*! declined: a chain mixing the two operators is no flat list of either's, and
64
+
twoqueriesarenottwooperandsofanything*/@supports (display:grid) and (display:flex) or (display:table){.t47h{color:red}}@media (monochrome),(monochrome){.t47i{color:red}}",
58
65
"/*! webpack: a container query */@container card (width>400px){.t48{color:red}}",
59
66
"/*! webpack: an @supports condition */@supports (display:grid){.t49{color:red}}",
60
67
"/*! webpack: ...on a custom property */@supports (--x:1){.t50{color:red}}",
@@ -196,6 +203,10 @@ Array [
196
203
"/*! declined: ...but only then */.t96{transform:matrix3d(20,20,0,0,40,40,0,0,0,0,1,5,80,80,0,1)}",
197
204
"/*! webpack: a 2D pair of 1 leaves the z scale alone */.t97{transform:scaleZ(1.5)}",
198
205
"/*! webpack: a zero time keeps a unit, and \`s\` is the shorter one it can carry */.t98{transition-duration:0s}",
206
+
"/*! webpack: a shorthand slot holding its own initial goes, and a slot taking a
207
+
length or a color is read by the classes a sibling's own value is in — every
208
+
slot holding its initial leaves the shortest of them saying all of them */.t98a{border:none}.t98b{column-rule:none}.t98c{border:solidred}",
209
+
"/*! declined: a sibling filling the slot keeps the initial there */.t98d{border:medium 1px}.t98e{border:currentcolorred}",
199
210
"/*! webpack: a component spelling the property's own initial says nothing beside
200
211
another — omitting its group leaves exactly that keyword */.t99{grid-auto-flow:dense}",
201
212
"/*! declined: the other alternative of the group is not the initial */.t99a{grid-auto-flow:columndense}",
* @property {string[]=} schemes the color schemes to read it under
1182
1182
* @property {string[]=} directions the writing directions to read it under
1183
1183
* @property {string[]=} differs properties this lowering changes on purpose
1184
+
* @property {string[]=} introduces custom properties the lowering writes that the source has none of, which a script enumerating them would see
1184
1185
* @property {string[]=} numeric properties whose value the rewrite reaches by arithmetic, held to `numericallyEqual` rather than to the same text
1185
1186
* @property {string[]} produces text the rewrite leaves, so a comparison of two sheets neither of which was rewritten cannot pass for one
1186
1187
* @property {string=} reference what the source means, where the engine reads no spelling of it — `:lang(en, fr)` is one Chromium has never taken, so the rewrite is held to the pair of rules that state the same thing rather than to an engine's reading of the original
0 commit comments