Skip to content

Commit db0550b

Browse files
docs(css): trim four generator comments to the two-line limit
Also says why `SUPPORTED_FEATURES` is stated rather than derived: no dataset names which abilities the printer reaches for. Reported by CodeRabbit on #21829.
1 parent 52e389a commit db0550b

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

‎tooling/generate-css-data.js‎

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3142,10 +3142,8 @@ const SUPPLEMENT = {
31423142
["translatex", "translate"],
31433143
["skewx", "skew"]
31443144
],
3145-
// The pair shorthands the target's `placeShorthand` ability gates: newer than
3146-
// the longhands they merge, so a target reading `align-items` may not read
3147-
// `place-items` and the merge would lose both declarations rather than one.
3148-
// `mdn-data` states no version, so the set is named rather than derived.
3145+
// Newer than the longhands they merge, so the merge would lose both
3146+
// declarations. Named because `mdn-data` states no version.
31493147
placeShorthands: ["place-content", "place-items", "place-self"],
31503148
// Pair shorthands whose *two-value* form is the newer one, so the merge is
31513149
// safe only where it collapses to a single value: `overflow: hidden` is CSS
@@ -4018,11 +4016,8 @@ const encodeVersion = (version) => {
40184016
return parsedMajor * 100000 + (Number.parseInt(minor, 10) || 0);
40194017
};
40204018

4021-
// The CSS abilities a target either has or does not, each as the BCD paths that
4022-
// have to have arrived for it: several where one spelling covers several
4023-
// constructs, and then the ability is only there once the last of them is. Read
4024-
// out of BCD rather than stated, so an engine shipping one moves the table on
4025-
// the next `yarn fix:special` instead of going stale unread.
4019+
// Each ability the printer reaches for -> the BCD paths that all have to have
4020+
// arrived for it. Stated because no dataset names what the printer emits.
40264021
/** @type {[string, string[]][]} */
40274022
const SUPPORTED_FEATURES = [
40284023
[
@@ -4051,11 +4046,8 @@ const SUPPORTED_FEATURES = [
40514046
];
40524047

40534048
/**
4054-
* Whether a BCD support entry is the plain spelling arriving for good. One
4055-
* behind a flag is not support a page can rely on, one spelled with a prefix or
4056-
* another name is not the plain spelling at all, and one BCD later removed is
4057-
* support that ended — reading any of them as the arrival is what would let a
4058-
* construct be written for a target that cannot read it.
4049+
* Whether a BCD entry is the plain spelling arriving for good — prefixed,
4050+
* renamed, flagged and later-removed support are none of them the arrival.
40594051
* @param {BcdSupport} entry a BCD support entry
40604052
* @returns {boolean} true when it is the plain spelling, still supported
40614053
*/
@@ -4201,9 +4193,8 @@ const collectPrefixes = (compat, name, alternatives) => {
42014193
const entries = Array.isArray(raw) ? raw : [raw];
42024194
let unprefixedFrom = null;
42034195
for (const entry of entries) {
4204-
// The earliest plain entry is the arrival — BCD's newest-first ordering is
4205-
// convention, not schema. Reading a removed one as support would drop
4206-
// `-webkit-mask` against a `mask` Chrome has only partially had since 1.
4196+
// The earliest plain entry is the arrival — BCD's newest-first ordering
4197+
// is convention, not schema.
42074198
if (!isPlainSupport(entry)) continue;
42084199
const added = encodeVersion(entry.version_added);
42094200
if (

0 commit comments

Comments
 (0)