From 565162b1caa6126674d00defca2cdcaae256d16a Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Thu, 15 Aug 2024 18:04:07 -0400 Subject: [PATCH 01/10] First stroke properties --- css/properties.json | 76 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/css/properties.json b/css/properties.json index 27d952e5..a8716a0a 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9245,6 +9245,82 @@ "status": "standard", "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/shape-outside" }, + "stroke": { + "syntax": "", + "media": "visual", + "inherited": true, + "animationType": [ + "stroke-color", + "stroke-image", + "stroke-origin", + "stroke-position", + "stroke-size", + "stroke-repeat" + ], + "percentages": "no", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": [ + "stroke-color", + "stroke-image", + "stroke-origin", + "stroke-position", + "stroke-size", + "stroke-repeat" + ], + "appliesto": [ + "stroke-color", + "stroke-image", + "stroke-origin", + "stroke-position", + "stroke-size", + "stroke-repeat" + ], + "computed": [ + "stroke-color", + "stroke-image", + "stroke-origin", + "stroke-position", + "stroke-size", + "stroke-repeat" + ], + "order": "perGrammar", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke" + }, + "stroke-color": { + "syntax": "#", + "media": "visual", + "inherited": true, + "animationType": "byComputedValueType", + "percentages": "no", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "transparent", + "appliesto": "blockContainers", + "computed": "computedColor", + "order": "perGrammar", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-color" + }, + "stroke-image": { + "syntax": "#", + "media": "visual", + "inherited": true, + "animationType": "", + "percentages": "no", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "none", + "appliesto": "blockContainers", + "computed": "computedColor", + "order": "perGrammar", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-color" + }, "tab-size": { "syntax": " | ", "media": "visual", From e88bd189fdb9fb90260c90534c026695c6399abd Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Thu, 15 Aug 2024 20:20:40 -0400 Subject: [PATCH 02/10] feat: Add stroke CSS SVG properties --- css/properties.json | 110 ++++++++++++++++++++++++++++++++----- css/properties.schema.json | 5 ++ l10n/css.json | 18 ++++++ 3 files changed, 118 insertions(+), 15 deletions(-) diff --git a/css/properties.json b/css/properties.json index a8716a0a..f4061ffb 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9289,37 +9289,117 @@ "status": "standard", "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke" }, - "stroke-color": { - "syntax": "#", + "stroke-dasharray": { + "syntax": "none | ", + "media": "visual", + "inherited": true, + "animationType": "", + "percentages": "referToSVGViewportDiagonal", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "none", + "appliesto": "limitedSVGElementsShapes", + "computed": "listEachItemConsistingOfAbsoluteLengthPercentageOrKeyword", + "order": "uniqueOrder", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray" + }, + "stroke-dashoffset": { + "syntax": " | ", "media": "visual", "inherited": true, "animationType": "byComputedValueType", + "percentages": "referToSVGViewportDiagonal", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "0", + "appliesto": "limitedSVGElementsShapes", + "computed": "absoluteLengthOrPercentageNumbersConverted", + "order": "uniqueOrder", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset" + }, + "stroke-linecap": { + "syntax": "butt | round | square", + "media": "visual", + "inherited": true, + "animationType": "discrete", "percentages": "no", "groups": [ "Scalable Vector Graphics" ], - "initial": "transparent", - "appliesto": "blockContainers", - "computed": "computedColor", - "order": "perGrammar", + "initial": "butt", + "appliesto": "limitedSVGElementsShapes", + "computed": "asSpecified", + "order": "uniqueOrder", "status": "standard", - "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-color" + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-linecap" }, - "stroke-image": { - "syntax": "#", + "stroke-linejoin": { + "syntax": "miter | miter-clip | round | bevel | arcs", "media": "visual", "inherited": true, - "animationType": "", + "animationType": "discrete", "percentages": "no", "groups": [ "Scalable Vector Graphics" ], - "initial": "none", - "appliesto": "blockContainers", - "computed": "computedColor", - "order": "perGrammar", + "initial": "miter", + "appliesto": "limitedSVGElementsShapes", + "computed": "asSpecified", + "order": "uniqueOrder", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin" + }, + "stroke-miterlimit": { + "syntax": "", + "media": "visual", + "inherited": true, + "animationType": "byComputedValueType", + "percentages": "no", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "4", + "appliesto": "limitedSVGElementsShapes", + "computed": "asSpecified", + "order": "uniqueOrder", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit" + }, + "stroke-opacity": { + "syntax": "", + "media": "visual", + "inherited": true, + "animationType": "byComputedValueType", + "percentages": "no", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "1", + "appliesto": "limitedSVGElementsShapes", + "computed": "specifiedValueClipped0To1", + "order": "uniqueOrder", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-opacity" + }, + "stroke-width": { + "syntax": " | ", + "media": "visual", + "inherited": true, + "animationType": "byComputedValueType", + "percentages": "referToSVGViewportDiagonal", + "groups": [ + "Scalable Vector Graphics" + ], + "initial": "1px", + "appliesto": "limitedSVGElementsShapes", + "computed": "absoluteLengthOrPercentageNumbersConverted", + "order": "uniqueOrder", "status": "standard", - "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-color" + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-width" }, "tab-size": { "syntax": " | ", diff --git a/css/properties.schema.json b/css/properties.schema.json index 0a527156..863dbe6b 100644 --- a/css/properties.schema.json +++ b/css/properties.schema.json @@ -77,6 +77,7 @@ "referToSVGViewportHeight", "referToSVGViewportSize", "referToSVGViewportWidth", + "referToSVGViewportDiagonal", "referToTotalPathLength", "referToWidthAndHeightOfElement", "referToWidthOfAffectedGlyph", @@ -110,6 +111,7 @@ "absoluteLengthOrNone", "absoluteLengthOrNormal", "absoluteLengthOrPercentage", + "absoluteLengthOrPercentageNumbersConverted", "absoluteLengthsSpecifiedColorAsSpecified", "absoluteLengthZeroIfBorderStyleNoneOrHidden", "absoluteLengthZeroOrLarger", @@ -243,6 +245,9 @@ "limitedSVGElementsEllipse", "limitedSVGElementsEllipseRect", "limitedSVGElementsGeometry", + "limitedSVGElementsShapes", + "limitedSVGElementsShapesAndTextContent", + "limitedSVGElementsTextContent", "listItems", "maskElements", "multicolElements", diff --git a/l10n/css.json b/l10n/css.json index 4a635830..ea2a140d 100644 --- a/l10n/css.json +++ b/l10n/css.json @@ -91,6 +91,9 @@ "ja": "{{cssxref(\"length\")}} の場合は絶対的な値、それ以外はパーセント値", "ru": "для {{cssxref(\"length\")}} абсолютного значения, иначе процент" }, + "absoluteLengthOrPercentageNumbersConverted": { + "en-US": "an absolute {{cssxref(\"length\")}} or {{cssxref(\"percentage\")}}, numbers converted to absolute lengths first", + }, "absoluteLengthsSpecifiedColorAsSpecified": { "de": "Längen absolut gemacht; angegebene Farben berechnet; ansonsten wie angegeben", "en-US": "any length made absolute; any specified color computed; otherwise as specified", @@ -971,6 +974,15 @@ "limitedSVGElementsEllipseRect": { "en-US": "{{SVGElement(\"ellipse\")}} and {{SVGElement(\"rect\")}} elements in {{SVGElement(\"svg\")}}" }, + "limitedSVGElementsShapes": { + "en-US": "{{SVGElement(\"circle\")}}, {{SVGElement(\"ellipse\")}}, {{SVGElement(\"line\")}}, {{SVGElement(\"path\")}}, {{SVGElement(\"polygon\")}}, {{SVGElement(\"polyline\")}}, and {{SVGElement(\"rect\")}} elements in an svg" + }, + "limitedSVGElementsShapesAndTextContent": { + "en-US": "{{SVGElement(\"circle\")}}, {{SVGElement(\"ellipse\")}}, {{SVGElement(\"line\")}}, {{SVGElement(\"path\")}}, {{SVGElement(\"polygon\")}}, {{SVGElement(\"polyline\")}}, {{SVGElement(\"rect\")}}, {{SVGElement(\"text\")}}, {{SVGElement(\"textPath\")}}, and {{SVGElement(\"tspan\")}} elements in an svg" + }, + "limitedSVGElementsTextContent": { + "en-US": "{{SVGElement(\"text\")}}, {{SVGElement(\"textPath\")}}, and {{SVGElement(\"tspan\")}} elements in an svg" + }, "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin": { "de": "Eine Liste, bei der jeder Eintrag aus einem Versatz besteht, der durch eine Kombination aus absoluter Länge und einem Prozentsatz plus einem Ursprungsschlüsselwort definiert wird", "en-US": "A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword", @@ -978,6 +990,9 @@ "ja": "絶対長とパーセント値の組み合わせで与えられるオフセットと原点のキーワードを、各項目として構成されるリスト。", "ru": "Список, каждый элемент которого состоит из: смещения, данного комбинацией абсолютной длины и процентов плюс ключевое слово" }, + "listEachItemConsistingOfAbsoluteLengthPercentageOrKeyword": { + "en-US": "A comma separated list of absolute lengths or percentages, numbers converted to absolute lengths first, or keyword specified" + }, "listEachItemConsistingOfNormalLengthPercentageOrNameLengthPercentage": { "en-US": "A list where each item may be 'normal', a length percentage, or a timeline range name and a length percentage", "ja": "リストで、それぞれの項目は 'normal'、長さのパーセント値、タイムラインの範囲名と長さのパーセント値のいずれか。" @@ -1430,6 +1445,9 @@ "referToSVGViewportWidth": { "en-US": "refer to the width of the current SVG viewport" }, + "referToSVGViewportDiagonal": { + "en-US": "refer to the normalized diagonal measure of the current SVG viewport’s applied {{SVGAttr(\"viewBox\")}}, or of the viewport itself if no `viewBox` is specified" + }, "referToTotalPathLength": { "de": "beziehen sich auf die Gesamtlänge des Pfads", "en-US": "refer to the total path length", From 131993296f4c2ffb54db7cc1fdb702a8c94cdc92 Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 11:27:13 -0400 Subject: [PATCH 03/10] Fixed shorthand animation, computed, etc. referents --- css/properties.json | 52 ++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/css/properties.json b/css/properties.json index f4061ffb..b5328411 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9250,40 +9250,44 @@ "media": "visual", "inherited": true, "animationType": [ - "stroke-color", - "stroke-image", - "stroke-origin", - "stroke-position", - "stroke-size", - "stroke-repeat" + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width" ], "percentages": "no", "groups": [ "Scalable Vector Graphics" ], "initial": [ - "stroke-color", - "stroke-image", - "stroke-origin", - "stroke-position", - "stroke-size", - "stroke-repeat" + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width" ], "appliesto": [ - "stroke-color", - "stroke-image", - "stroke-origin", - "stroke-position", - "stroke-size", - "stroke-repeat" + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width" ], "computed": [ - "stroke-color", - "stroke-image", - "stroke-origin", - "stroke-position", - "stroke-size", - "stroke-repeat" + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width" ], "order": "perGrammar", "status": "standard", From db2418ae082f95e6ad14231f2f8a2dd06ff25d5d Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 11:39:36 -0400 Subject: [PATCH 04/10] Further lint corrections --- css/properties.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/css/properties.json b/css/properties.json index b5328411..bef7a8d1 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9271,15 +9271,7 @@ "stroke-opacity", "stroke-width" ], - "appliesto": [ - "stroke-dasharray", - "stroke-dashoffset", - "stroke-linecap", - "stroke-linejoin", - "stroke-miterlimit", - "stroke-opacity", - "stroke-width" - ], + "appliesto": "asLonghands", "computed": [ "stroke-dasharray", "stroke-dashoffset", From 2815ea8e5cac83703c6a162e24b8f474cdadef98 Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 11:41:54 -0400 Subject: [PATCH 05/10] Restored 'asLonghands' --- css/properties.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/css/properties.schema.json b/css/properties.schema.json index 863dbe6b..e146b99c 100644 --- a/css/properties.schema.json +++ b/css/properties.schema.json @@ -120,6 +120,7 @@ "asAutoOrColor", "asDefinedForBasicShapeWithAbsoluteURIOtherwiseAsSpecified", "asLength", + "asLonghands", "asSpecified", "asSpecifiedAppliesToEachProperty", "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent", From 74927fb97eed998721898413e3173562df351ee2 Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 11:43:43 -0400 Subject: [PATCH 06/10] Restored 'asLonghands' --- css/properties.json | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/css/properties.json b/css/properties.json index bef7a8d1..2c62d67b 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9271,16 +9271,8 @@ "stroke-opacity", "stroke-width" ], - "appliesto": "asLonghands", - "computed": [ - "stroke-dasharray", - "stroke-dashoffset", - "stroke-linecap", - "stroke-linejoin", - "stroke-miterlimit", - "stroke-opacity", - "stroke-width" - ], + "appliesto": "seeLonghandProperties", + "computed": "asLonghands", "order": "perGrammar", "status": "standard", "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke" From 51dadf9b19fc3f7b755bbdfd071041fc3f0fea08 Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 11:45:32 -0400 Subject: [PATCH 07/10] Added 'asLonghands' --- css/properties.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/css/properties.schema.json b/css/properties.schema.json index e146b99c..21c0c423 100644 --- a/css/properties.schema.json +++ b/css/properties.schema.json @@ -200,6 +200,7 @@ "allElementsTreeAbidingPseudoElementsPageMarginBoxes", "allElementsUAsNotRequiredWhenCollapse", "anyElementEffectOnProgressAndMeter", + "asLonghands", "beforeAndAfterPseudos", "blockContainerElements", "blockContainers", From 9e0ceaea4ae736fec1119792cbb5af8efc51364f Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 12:21:22 -0400 Subject: [PATCH 08/10] JSON formatting error fixes --- css/properties.json | 4 ++-- l10n/css.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/css/properties.json b/css/properties.json index 2c62d67b..3346a737 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9271,7 +9271,7 @@ "stroke-opacity", "stroke-width" ], - "appliesto": "seeLonghandProperties", + "appliesto": "asLonghands", "computed": "asLonghands", "order": "perGrammar", "status": "standard", @@ -9281,7 +9281,7 @@ "syntax": "none | ", "media": "visual", "inherited": true, - "animationType": "", + "animationType": "repeatableList", "percentages": "referToSVGViewportDiagonal", "groups": [ "Scalable Vector Graphics" diff --git a/l10n/css.json b/l10n/css.json index ea2a140d..95c49fd4 100644 --- a/l10n/css.json +++ b/l10n/css.json @@ -92,7 +92,7 @@ "ru": "для {{cssxref(\"length\")}} абсолютного значения, иначе процент" }, "absoluteLengthOrPercentageNumbersConverted": { - "en-US": "an absolute {{cssxref(\"length\")}} or {{cssxref(\"percentage\")}}, numbers converted to absolute lengths first", + "en-US": "an absolute {{cssxref(\"length\")}} or {{cssxref(\"percentage\")}}, numbers converted to absolute lengths first" }, "absoluteLengthsSpecifiedColorAsSpecified": { "de": "Längen absolut gemacht; angegebene Farben berechnet; ansonsten wie angegeben", From 4ab884f20e9769f90a476d994a7d598d7a4f00cc Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Fri, 16 Aug 2024 12:24:24 -0400 Subject: [PATCH 09/10] Schema correction --- css/properties.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/css/properties.schema.json b/css/properties.schema.json index 21c0c423..9e0db9f5 100644 --- a/css/properties.schema.json +++ b/css/properties.schema.json @@ -144,6 +144,7 @@ "keywordPlusIntegerIfDigits", "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto", "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin", + "listEachItemConsistingOfAbsoluteLengthPercentageOrKeyword", "listEachItemConsistingOfNormalLengthPercentageOrNameLengthPercentage", "listEachItemConsistingOfPairsOfAutoOrLengthPercentage", "listEachItemHasTwoKeywordsOnePerDimension", From 92342158eb34212c158386b5791ae15c523c3d19 Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Thu, 5 Sep 2024 10:45:44 +0200 Subject: [PATCH 10/10] fix: broken JSON in /Web/CSS/stroke prop --- css/properties.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/css/properties.json b/css/properties.json index 7ca7bb70..d0791e68 100644 --- a/css/properties.json +++ b/css/properties.json @@ -9375,7 +9375,9 @@ "computed": "asSpecified", "order": "perGrammar", "status": "standard", - "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/shape-rendering" "stroke": { + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/shape-rendering" + }, + "stroke": { "syntax": "", "media": "visual", "inherited": true,