From f54905d2b12c38a65f3bafe35e8fcf59c31613df Mon Sep 17 00:00:00 2001 From: Dmitrii Troitskii Date: Fri, 27 Feb 2026 02:34:12 +0000 Subject: [PATCH] fix: support maskType SVG attribute as mask-type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add maskType → mask-type to the SVG attribute alias map so React correctly renders as mask-type="luminance" on the DOM element instead of the unrecognized camelCase prop. Also add the masktype → maskType entry in possibleStandardNames so the development warning points users to the correct camelCase spelling. Fixes: https://github.com/facebook/react/issues/35920 MDN reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/mask-type --- packages/react-dom-bindings/src/shared/getAttributeAlias.js | 1 + packages/react-dom-bindings/src/shared/possibleStandardNames.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-dom-bindings/src/shared/getAttributeAlias.js b/packages/react-dom-bindings/src/shared/getAttributeAlias.js index 2ed432f20275..31ce02f5d560 100644 --- a/packages/react-dom-bindings/src/shared/getAttributeAlias.js +++ b/packages/react-dom-bindings/src/shared/getAttributeAlias.js @@ -50,6 +50,7 @@ const aliases = new Map([ ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], + ['maskType', 'mask-type'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], diff --git a/packages/react-dom-bindings/src/shared/possibleStandardNames.js b/packages/react-dom-bindings/src/shared/possibleStandardNames.js index 369b87110b23..b237d116e43e 100644 --- a/packages/react-dom-bindings/src/shared/possibleStandardNames.js +++ b/packages/react-dom-bindings/src/shared/possibleStandardNames.js @@ -314,6 +314,7 @@ const possibleStandardNames = { markerwidth: 'markerWidth', mask: 'mask', maskcontentunits: 'maskContentUnits', + masktype: 'maskType', maskunits: 'maskUnits', mathematical: 'mathematical', mode: 'mode',