@@ -2747,6 +2747,7 @@ const collectInitialValueKeywords = () => {
27472747 /** @type {[string, string][] } */
27482748 const out = [ ] ;
27492749 const stated = new Map ( SUPPLEMENT . initialValueKeywords ) ;
2750+ const readsApart = new Set ( SUPPLEMENT . initialKeywordsAnEngineReadsApart ) ;
27502751 for ( const [ name , entry ] of Object . entries ( properties ) ) {
27512752 // `mdn-data`'s own types omit the field, which its data does carry.
27522753 const written = /** @type {{ initial?: string | string[] } } */ ( entry )
@@ -2773,6 +2774,9 @@ const collectInitialValueKeywords = () => {
27732774 // Chromium: `outline-width:initial` computes to 1.5px at `zoom:2` and
27742775 // `outline-width:medium` to 3px.
27752776 if ( lengthKeywords . has ( initial ) ) continue ;
2777+ // WHY: The spec states one initial and an engine reads another, so writing
2778+ // the keyword back is a different declaration rather than the same one.
2779+ if ( readsApart . has ( name ) ) continue ;
27762780 out . push ( [ name , initial ] ) ;
27772781 }
27782782 return out . sort ( ( a , b ) => ( a [ 0 ] < b [ 0 ] ? - 1 : 1 ) ) ;
@@ -3773,7 +3777,7 @@ const eighthTurnEntries = (values) => {
37733777// Spec prose no dataset states: an equivalence between two spellings, or a
37743778// judgement about what a construct still does. Each carries the reason it has to
37753779// be written out rather than derived.
3776- /** @type {{ cssWideKeywords: string[], cubicBezierKeywords: [string, string][], flexKeywords: [string, string][], fontWeightNumbers: [string, string][], fontStretchPercentages: [string, string][], filterFunctionOmitted: [string, string][], positionKeywordPercentages: [string, string][], legacyPseudoElements: string[], compoundContinuations: string[], featurelessPseudoClasses: string[], initialValueKeywords: [string, string][], unmergeableSlotKeywords: [string, string][], zeroUnitKeepingProperties: string[], calcRejectingProperties: string[], clampedValueRanges: [string, string, number, number][], autoSecondValueProperties: string[], defaultGradientDirections: string[], xAxisTransforms: [string, string][], negativeAcceptingProperties: string[], placeShorthands: string[], oneValuePairShorthands: string[], familyShorthands: string[], orderedShorthands: string[], omittableInitialKeywords: string[], pairLonghandOverrides: [string, string[]][], droppableWhenEmptyAtRules: string[], replacedByNameAtRules: string[], classSpellings: [string, string[]][], absoluteUnitScale: [string, string, number][], unitConversionTargets: string[], angleUnits: string[], colorSpacePrimitives: [string, string][], oklabMatrices: number[][], systemUiStack: string[], colorTransfers: [string, string][], predefinedColorSpaces: [string, string, string, string][], colorPrimaries: [string, number[]][], colorWhitePoints: [string, number[]][], enginesDisagreeOnTransfer: string[], calcConstantValues: [string, string][], quarterTurnAngle: [string, number][], eighthTurnSine: (number | null)[], eighthTurnTangent: (number | null)[], mathFunctionFold: [string, string, string, string, string | null, boolean][], mathPrimitives: [string, string][], predefinedCounterStyles: string[], predefinedCounterNames: string[], cssModulesKeywordSupplement: [string, string, number][] } } */
3780+ /** @type {{ cssWideKeywords: string[], cubicBezierKeywords: [string, string][], flexKeywords: [string, string][], fontWeightNumbers: [string, string][], fontStretchPercentages: [string, string][], filterFunctionOmitted: [string, string][], positionKeywordPercentages: [string, string][], legacyPseudoElements: string[], compoundContinuations: string[], featurelessPseudoClasses: string[], initialValueKeywords: [string, string][], initialKeywordsAnEngineReadsApart: string[], unmergeableSlotKeywords: [string, string][], zeroUnitKeepingProperties: string[], calcRejectingProperties: string[], clampedValueRanges: [string, string, number, number][], autoSecondValueProperties: string[], defaultGradientDirections: string[], xAxisTransforms: [string, string][], negativeAcceptingProperties: string[], placeShorthands: string[], oneValuePairShorthands: string[], familyShorthands: string[], orderedShorthands: string[], omittableInitialKeywords: string[], pairLonghandOverrides: [string, string[]][], droppableWhenEmptyAtRules: string[], replacedByNameAtRules: string[], classSpellings: [string, string[]][], absoluteUnitScale: [string, string, number][], unitConversionTargets: string[], angleUnits: string[], colorSpacePrimitives: [string, string][], oklabMatrices: number[][], systemUiStack: string[], colorTransfers: [string, string][], predefinedColorSpaces: [string, string, string, string][], colorPrimaries: [string, number[]][], colorWhitePoints: [string, number[]][], enginesDisagreeOnTransfer: string[], calcConstantValues: [string, string][], quarterTurnAngle: [string, number][], eighthTurnSine: (number | null)[], eighthTurnTangent: (number | null)[], mathFunctionFold: [string, string, string, string, string | null, boolean][], mathPrimitives: [string, string][], predefinedCounterStyles: string[], predefinedCounterNames: string[], cssModulesKeywordSupplement: [string, string, number][] } } */
37773781
37783782const SUPPLEMENT = {
37793783 // CSS Values 4's list. `mdn-data` has no `css-wide-keyword` production.
@@ -3863,6 +3867,20 @@ const SUPPLEMENT = {
38633867 // Chromium under both `dir=ltr` and `dir=rtl`: `initial`, `start` and `unset`
38643868 // compute alike and paint the glyph at the same offset.
38653869 initialValueKeywords : [ [ "text-align" , "start" ] ] ,
3870+ // WHY: Not derivable — `mdn-data` states the initial its spec gives, and `bcd`
3871+ // answers when a value arrived rather than what `initial` computes to. Each of
3872+ // these ships a keyword an engine reads apart from `initial`, so writing it
3873+ // back is a different declaration. Measured in headless Chromium:
3874+ // `outline-color:auto` and `text-emphasis-position:auto` are refused outright,
3875+ // `overflow-block` and `overflow-inline` compute `visible` where the spec says
3876+ // `auto`, and `text-autospace` computes `no-autospace` where it says `normal`.
3877+ initialKeywordsAnEngineReadsApart : [
3878+ "outline-color" ,
3879+ "overflow-block" ,
3880+ "overflow-inline" ,
3881+ "text-autospace" ,
3882+ "text-emphasis-position"
3883+ ] ,
38663884 // Not derivable, no grammar says the unit matters here: IE 11 drops a unitless
38673885 // `flex-basis`, and Chrome rejects `overflow-clip-margin:0` the spec allows.
38683886 zeroUnitKeepingProperties : [ "flex-basis" , "overflow-clip-margin" ] ,
0 commit comments