@@ -29,6 +29,7 @@ function gutenberg_register_typography_support( $block_type ) {
29
29
$ has_text_align_support = $ typography_supports ['textAlign ' ] ?? false ;
30
30
$ has_text_columns_support = $ typography_supports ['textColumns ' ] ?? false ;
31
31
$ has_text_decoration_support = $ typography_supports ['__experimentalTextDecoration ' ] ?? false ;
32
+ $ has_text_indent_support = $ typography_supports ['__experimentalTextIndent ' ] ?? false ;
32
33
$ has_text_transform_support = $ typography_supports ['__experimentalTextTransform ' ] ?? false ;
33
34
$ has_writing_mode_support = $ typography_supports ['__experimentalWritingMode ' ] ?? false ;
34
35
@@ -41,6 +42,7 @@ function gutenberg_register_typography_support( $block_type ) {
41
42
|| $ has_text_align_support
42
43
|| $ has_text_columns_support
43
44
|| $ has_text_decoration_support
45
+ || $ has_text_indent_support
44
46
|| $ has_text_transform_support
45
47
|| $ has_writing_mode_support ;
46
48
@@ -100,6 +102,7 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) {
100
102
$ has_text_align_support = $ typography_supports ['textAlign ' ] ?? false ;
101
103
$ has_text_columns_support = $ typography_supports ['textColumns ' ] ?? false ;
102
104
$ has_text_decoration_support = $ typography_supports ['__experimentalTextDecoration ' ] ?? false ;
105
+ $ has_text_indent_support = $ typography_supports ['__experimentalTextIndent ' ] ?? false ;
103
106
$ has_text_transform_support = $ typography_supports ['__experimentalTextTransform ' ] ?? false ;
104
107
$ has_writing_mode_support = $ typography_supports ['__experimentalWritingMode ' ] ?? false ;
105
108
@@ -112,6 +115,7 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) {
112
115
$ should_skip_text_align = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textAlign ' );
113
116
$ should_skip_text_columns = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textColumns ' );
114
117
$ should_skip_text_decoration = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textDecoration ' );
118
+ $ should_skip_text_indent = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textIndent ' );
115
119
$ should_skip_text_transform = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'textTransform ' );
116
120
$ should_skip_letter_spacing = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'letterSpacing ' );
117
121
$ should_skip_writing_mode = wp_should_skip_block_supports_serialization ( $ block_type , 'typography ' , 'writingMode ' );
@@ -160,6 +164,11 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) {
160
164
gutenberg_typography_get_preset_inline_style_value ( $ block_attributes ['style ' ]['typography ' ]['textDecoration ' ], 'text-decoration ' );
161
165
}
162
166
167
+ if ( $ has_text_indent_support && ! $ should_skip_text_indent && isset ( $ block_attributes ['style ' ]['typography ' ]['textIndent ' ] ) ) {
168
+ $ typography_block_styles ['textIndent ' ] =
169
+ gutenberg_typography_get_preset_inline_style_value ( $ block_attributes ['style ' ]['typography ' ]['textIndent ' ], 'text-indent ' );
170
+ }
171
+
163
172
if ( $ has_text_transform_support && ! $ should_skip_text_transform && isset ( $ block_attributes ['style ' ]['typography ' ]['textTransform ' ] ) ) {
164
173
$ typography_block_styles ['textTransform ' ] =
165
174
gutenberg_typography_get_preset_inline_style_value ( $ block_attributes ['style ' ]['typography ' ]['textTransform ' ], 'text-transform ' );
0 commit comments