From 2e42c3103bce792eeef80730844a04cb9c6db752 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:36:18 +0800 Subject: [PATCH] feat(css): Add data for `lighting-color`, `flood-color`, `flood-opacity` (#787) * feat(css): Add data for `lighting-color`, `flood-color`, and `flood-opacity` * Update css/properties.json * fix groups * Update css.json * Update css.json * Update css.json * Apply suggestions from code review --------- Co-authored-by: Vadim Makeev --- css/properties.json | 50 +++++++++++++++++++++++++++++++++++++- css/properties.schema.json | 2 ++ l10n/css.json | 22 +++++++++++------ 3 files changed, 65 insertions(+), 9 deletions(-) diff --git a/css/properties.json b/css/properties.json index b2c6bd4a7..3877e9c72 100644 --- a/css/properties.json +++ b/css/properties.json @@ -4150,7 +4150,7 @@ "animationType": "discrete", "percentages": "no", "groups": [ - "Scalable Vector Graphics" + "Filter Effects" ], "initial": "linearRGB", "appliesto": "limitedSVGElementsFilterPrimitives", @@ -4961,6 +4961,38 @@ "status": "standard", "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/float" }, + "flood-color": { + "syntax": "", + "media": "visual", + "inherited": false, + "animationType": "byComputedValue", + "percentages": "no", + "groups": [ + "Filter Effects" + ], + "initial": "black", + "appliesto": "limitedSVGElementsFloodAndDropShadow", + "computed": "asSpecified", + "order": "perGrammar", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/flood-color" + }, + "flood-opacity": { + "syntax": "<'opacity'>", + "media": "visual", + "inherited": false, + "animationType": "byComputedValue", + "percentages": "no", + "groups": [ + "Filter Effects" + ], + "initial": "black", + "appliesto": "limitedSVGElementsFloodAndDropShadow", + "computed": "specifiedValueClipped0To1", + "order": "perGrammar", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/flood-opacity" + }, "font": { "syntax": "[ [ <'font-style'> || || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar", "media": "visual", @@ -6436,6 +6468,22 @@ "status": "standard", "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/letter-spacing" }, + "lighting-color": { + "syntax": "", + "media": "visual", + "inherited": false, + "animationType": "byComputedValue", + "percentages": "no", + "groups": [ + "Filter Effects" + ], + "initial": "white", + "appliesto": "limitedSVGElementsLightSource", + "computed": "asSpecified", + "order": "perGrammar", + "status": "standard", + "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/lighting-color" + }, "line-break": { "syntax": "auto | loose | normal | strict | anywhere", "media": "visual", diff --git a/css/properties.schema.json b/css/properties.schema.json index 811ad7ff0..ac224f241 100644 --- a/css/properties.schema.json +++ b/css/properties.schema.json @@ -251,9 +251,11 @@ "limitedSVGElementsEllipse", "limitedSVGElementsEllipseRect", "limitedSVGElementsFilterPrimitives", + "limitedSVGElementsFloodAndDropShadow", "limitedSVGElementsGeometry", "limitedSVGElementsGraphics", "limitedSVGElementsGraphicsAndUse", + "limitedSVGElementsLightSource", "limitedSVGElementsPath", "limitedSVGElementsShapes", "limitedSVGElementsShapesAndTextContent", diff --git a/l10n/css.json b/l10n/css.json index b972dfdb0..241ad4a71 100644 --- a/l10n/css.json +++ b/l10n/css.json @@ -981,34 +981,40 @@ "en-US": "{{SVGElement(\"ellipse\")}} and {{SVGElement(\"rect\")}} elements in {{SVGElement(\"svg\")}}" }, "limitedSVGElementsGeometry": { - "en-US": "{{SVGElement(\"svg\")}}, {{SVGElement(\"rect\")}}, {{SVGElement(\"image\")}}, and {{SVGElement(\"foreignObject\")}} elements in an svg" - }, - "limitedSVGElementsPath": { - "en-US": "{{SVGElement(\"path\")}} elements in {{SVGElement(\"svg\")}}" - }, - "limitedSVGElementsShapeText": { - "en-US": "SVG shapes and text content elements" + "en-US": "{{SVGElement(\"svg\")}}, {{SVGElement(\"rect\")}}, {{SVGElement(\"image\")}}, and {{SVGElement(\"foreignObject\")}} elements in {{SVGElement(\"svg\")}}" }, "limitedSVGElementsFilterPrimitives": { "en-US": "The set of elements that control the output of a {{SVGElement(\"filter\")}} element in {{SVGElement(\"svg\")}}" }, + "limitedSVGElementsFloodAndDropShadow": { + "en-US": "{{SVGElement(\"feFlood\")}} and {{SVGElement(\"feDropShadow\")}} elements in {{SVGElement(\"svg\")}}" + }, "limitedSVGElementsGraphics": { "en-US": "{{SVGElement(\"circle\")}}, {{SVGElement(\"ellipse\")}}, {{SVGElement(\"foreignObject\")}}, {{SVGElement(\"image\")}}, {{SVGElement(\"line\")}}, {{SVGElement(\"path\")}}, {{SVGElement(\"polygon\")}}, {{SVGElement(\"polyline\")}}, {{SVGElement(\"rect\")}}, {{SVGElement(\"text\")}}, {{SVGElement(\"textPath\")}}, and {{SVGElement(\"tspan\")}} elements in {{SVGElement(\"svg\")}}" }, "limitedSVGElementsGraphicsAndUse": { "en-US": "{{SVGElement(\"circle\")}}, {{SVGElement(\"ellipse\")}}, {{SVGElement(\"foreignObject\")}}, {{SVGElement(\"image\")}}, {{SVGElement(\"line\")}}, {{SVGElement(\"path\")}}, {{SVGElement(\"polygon\")}}, {{SVGElement(\"polyline\")}}, {{SVGElement(\"rect\")}}, {{SVGElement(\"use\")}}, {{SVGElement(\"text\")}}, {{SVGElement(\"textPath\")}}, and {{SVGElement(\"tspan\")}} elements in {{SVGElement(\"svg\")}}" }, + "limitedSVGElementsLightSource": { + "en-US": "{{SVGElement(\"feDiffuseLighting\")}} and {{SVGElement(\"feSpecularLighting\")}} elements in {{SVGElement(\"svg\")}}" + }, + "limitedSVGElementsPath": { + "en-US": "{{SVGElement(\"path\")}} element 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" }, + "limitedSVGElementsShapeText": { + "en-US": "SVG shapes and text content elements" + }, "limitedSVGElementsStop": { "en-US": "{{SVGElement(\"stop\")}} elements in {{SVGElement(\"svg\")}}" }, "limitedSVGElementsTextContent": { - "en-US": "{{SVGElement(\"text\")}}, {{SVGElement(\"textPath\")}}, and {{SVGElement(\"tspan\")}} elements in an svg" + "en-US": "{{SVGElement(\"text\")}}, {{SVGElement(\"textPath\")}}, and {{SVGElement(\"tspan\")}} elements in {{SVGElement(\"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",