From c5b5dee3b0b6afec236bbb2526523bfbb6078645 Mon Sep 17 00:00:00 2001 From: shimotmk Date: Tue, 17 Dec 2024 18:22:49 +0900 Subject: [PATCH] fix writing-mode https://github.com/WordPress/gutenberg/pull/68023#discussion_r1887732639 --- packages/block-library/src/button/block.json | 11 ++++++++++- packages/block-library/src/button/edit.js | 1 + packages/block-library/src/button/save.js | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/button/block.json b/packages/block-library/src/button/block.json index 2d7b28938b22cb..85ed4c3982cd03 100644 --- a/packages/block-library/src/button/block.json +++ b/packages/block-library/src/button/block.json @@ -85,7 +85,16 @@ } }, "typography": { - "__experimentalSkipSerialization": true, + "__experimentalSkipSerialization": [ + "fontSize", + "lineHeight", + "__experimentalFontFamily", + "__experimentalFontWeight", + "__experimentalFontStyle", + "__experimentalTextTransform", + "__experimentalTextDecoration", + "__experimentalLetterSpacing" + ], "fontSize": true, "lineHeight": true, "__experimentalFontFamily": true, diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index 78cf8969777ad3..e43e71379dd2e4 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -318,6 +318,7 @@ function ButtonEdit( props ) { ...spacingProps.style, ...shadowProps.style, ...typographyProps.style, + writingMode: undefined, } } onReplace={ onReplace } onMerge={ mergeBlocks } diff --git a/packages/block-library/src/button/save.js b/packages/block-library/src/button/save.js index 255e3a31dde385..9069f25182a015 100644 --- a/packages/block-library/src/button/save.js +++ b/packages/block-library/src/button/save.js @@ -59,6 +59,7 @@ export default function save( { attributes, className } ) { ...spacingProps.style, ...shadowProps.style, ...typographyProps.style, + writingMode: undefined, }; // The use of a `title` attribute here is soft-deprecated, but still applied