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 ad75636
Browse filesBrowse the repository at this point in the historyBrowse files
perf(css): drop what a declaration, a slot or a query already says
Five things the minifier wrote out that say nothing:
- A declaration a later one overrides, where the two are spelled from one
vocabulary — a pair of numbers carrying one unit, a pair of hexes on one side
of the alpha four digits state, a pair of color names as old as naming a color,
or `inherit`. That is what parts an override from a fallback without asking
the target: `color:#eee` before `color:lab(…)` is the older color standing
where the newer one is not read, while `color:#eee;color:#333` is one an engine
reading either reads both of. Two adjacent rules with one selector join on the
same terms, where they used to be kept apart by any property they shared.
- A shorthand slot holding its own initial, where the slot takes more than
keywords: `border:medium none currentcolor` is `border:none`. The initial table
now carries what each slot takes beyond its spellings, so a sibling filling it
is read by the classes its own value is in — a length, a color — rather than by
a list of names, and a value that classes as nothing keeps the slot.
- A `<time>` of zero nothing after it depends on, in a transition or an
animation, and an iteration count of one.
- The `all` a media query states before an `and`, which matches what the
condition alone does.
- An operand a condition already states, in `@supports`, `@media` and
`@container` alike.
`rebeccapurple` and `transparent` are the names left out of the first, derived
from the compatibility rows they carry of their own: an engine may read neither
while reading the rest.
Held to Chromium: every rewrite computes as what it replaced, over the
equivalence fixtures a new one covers.
Copy file name to clipboardExpand all lines: test/configCases/css/minimize-nesting/__snapshots__/ConfigCacheTest.snap
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Array [
9
9
"/*! declined: a vendor pseudo is one an engine may not parse */.e{.n10::-webkit-scrollbar{top:0}.n11::-webkit-scrollbar{top:0}}",
10
10
"/*! values: a number, a time, a zero angle and a color all fold the same nested */.f{.n12{transition-duration:.5s;transform:rotate(0);color:#fff;width:5px}}",
11
11
"/*! shorthand: four sides merge into the one shorthand inside a nested rule */.g{.n13{margin:1px 2px}}",
12
-
"/*! shorthand: ...and a slot holding its own initial goes */.h{.n14{transition:opacity 1s 0s}}",
12
+
"/*! shorthand: ...and a slot holding its own initial goes */.h{.n14{transition:opacity 1s}}",
13
13
"/*! filter: an argument that is the amount an omitted one means says nothing */.i{.n15{filter:blur()grayscale()}}",
14
14
"/*! declaration: only the last of a set of identical ones can be read */.j{.n16{color:red}}",
15
15
"/*! declaration: ...whatever nested rule stands between them */.k{color:red;.n17{top:0}color:red}",
Copy file name to clipboardExpand all lines: test/configCases/css/minimize-nesting/__snapshots__/ConfigTest.snap
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Array [
9
9
"/*! declined: a vendor pseudo is one an engine may not parse */.e{.n10::-webkit-scrollbar{top:0}.n11::-webkit-scrollbar{top:0}}",
10
10
"/*! values: a number, a time, a zero angle and a color all fold the same nested */.f{.n12{transition-duration:.5s;transform:rotate(0);color:#fff;width:5px}}",
11
11
"/*! shorthand: four sides merge into the one shorthand inside a nested rule */.g{.n13{margin:1px 2px}}",
12
-
"/*! shorthand: ...and a slot holding its own initial goes */.h{.n14{transition:opacity 1s 0s}}",
12
+
"/*! shorthand: ...and a slot holding its own initial goes */.h{.n14{transition:opacity 1s}}",
13
13
"/*! filter: an argument that is the amount an omitted one means says nothing */.i{.n15{filter:blur()grayscale()}}",
14
14
"/*! declaration: only the last of a set of identical ones can be read */.j{.n16{color:red}}",
15
15
"/*! declaration: ...whatever nested rule stands between them */.k{color:red;.n17{top:0}color:red}",
0 commit comments