@@ -28,6 +28,7 @@ function gutenberg_register_typography_support( $block_type ) {
28
28
$ has_line_height_support = $ typography_supports ['lineHeight ' ] ?? false ;
29
29
$ has_text_columns_support = $ typography_supports ['textColumns ' ] ?? false ;
30
30
$ has_text_decoration_support = $ typography_supports ['__experimentalTextDecoration ' ] ?? false ;
31
+ $ has_text_indent_support = $ typography_supports ['__experimentalTextIndent ' ] ?? false ;
31
32
$ has_text_transform_support = $ typography_supports ['__experimentalTextTransform ' ] ?? false ;
32
33
$ has_writing_mode_support = $ typography_supports ['__experimentalWritingMode ' ] ?? false ;
33
34
@@ -39,6 +40,7 @@ function gutenberg_register_typography_support( $block_type ) {
39
40
|| $ has_line_height_support
40
41
|| $ has_text_columns_support
41
42
|| $ has_text_decoration_support
43
+ || $ has_text_indent_support
42
44
|| $ has_text_transform_support
43
45
|| $ has_writing_mode_support ;
44
46
@@ -97,6 +99,7 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) {
97
99
$ has_line_height_support = $ typography_supports ['lineHeight ' ] ?? false ;
98
100
$ has_text_columns_support = $ typography_supports ['textColumns ' ] ?? false ;
99
101
$ has_text_decoration_support = $ typography_supports ['__experimentalTextDecoration ' ] ?? false ;
102
+ $ has_text_indent_support = $ typography_supports ['__experimentalTextIndent ' ] ?? false ;
100
103
$ has_text_transform_support = $ typography_supports ['__experimentalTextTransform ' ] ?? false ;
101
104
$ has_writing_mode_support = $ typography_supports ['__experimentalWritingMode ' ] ?? false ;
102
105
@@ -108,6 +111,7 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) {
108
111
$ should_skip_line_height = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'lineHeight ' );
109
112
$ should_skip_text_columns = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textColumns ' );
110
113
$ should_skip_text_decoration = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textDecoration ' );
114
+ $ should_skip_text_indent = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textIndent ' );
111
115
$ should_skip_text_transform = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textTransform ' );
112
116
$ should_skip_letter_spacing = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'letterSpacing ' );
113
117
$ should_skip_writing_mode = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'writingMode ' );
@@ -152,6 +156,11 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) {
152
156
gutenberg_typography_get_preset_inline_style_value ( $ block_attributes ['style ' ]['typography ' ]['textDecoration ' ], 'text-decoration ' );
153
157
}
154
158
159
+ if ( $ has_text_indent_support && ! $ should_skip_text_indent && isset ( $ block_attributes ['style ' ]['typography ' ]['textIndent ' ] ) ) {
160
+ $ typography_block_styles ['textIndent ' ] =
161
+ gutenberg_typography_get_preset_inline_style_value ( $ block_attributes ['style ' ]['typography ' ]['textIndent ' ], 'text-indent ' );
162
+ }
163
+
155
164
if ( $ has_text_transform_support && ! $ should_skip_text_transform && isset ( $ block_attributes ['style ' ]['typography ' ]['textTransform ' ] ) ) {
156
165
$ typography_block_styles ['textTransform ' ] =
157
166
gutenberg_typography_get_preset_inline_style_value ( $ block_attributes ['style ' ]['typography ' ]['textTransform ' ], 'text-transform ' );
0 commit comments