Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/block-supports/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
function gutenberg_register_typography_support( $block_type ) {
$has_font_size_support = false;
if ( property_exists( $block_type, 'supports' ) ) {
$has_font_size_support = gutenberg_experimental_get( $block_type->supports, array( '__experimentalFontSize' ), false );
$has_font_size_support = gutenberg_experimental_get( $block_type->supports, array( 'fontSize' ), false );
}

$has_line_height_support = false;
Expand Down Expand Up @@ -51,7 +51,7 @@ function gutenberg_register_typography_support( $block_type ) {
function gutenberg_apply_typography_support( $attributes, $block_attributes, $block_type ) {
$has_font_size_support = false;
if ( property_exists( $block_type, 'supports' ) ) {
$has_font_size_support = gutenberg_experimental_get( $block_type->supports, array( '__experimentalFontSize' ), false );
$has_font_size_support = gutenberg_experimental_get( $block_type->supports, array( 'fontSize' ), false );
}

$has_line_height_support = false;
Expand Down
8 changes: 4 additions & 4 deletions lib/global-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@ function gutenberg_experimental_global_styles_get_style_property() {
*/
function gutenberg_experimental_global_styles_get_support_keys() {
return array(
'--wp--style--color--link' => array( 'color', 'link' ),
'--wp--style--color--link' => array( 'color', 'linkColor' ),
'background' => array( 'color', 'gradients' ),
'backgroundColor' => array( 'color' ),
'color' => array( 'color' ),
'fontSize' => array( '__experimentalFontSize' ),
'fontSize' => array( 'fontSize' ),
'lineHeight' => array( '__experimentalLineHeight' ),
);
}
Expand Down Expand Up @@ -484,9 +484,9 @@ function gutenberg_experimental_global_styles_get_block_data() {
array(
'supports' => array(
'__experimentalSelector' => ':root',
'__experimentalFontSize' => true,
'fontSize' => true,
'color' => array(
'link' => true,
'linkColor' => true,
'gradients' => true,
),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/font-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { cleanEmptyObject } from './utils';
import useEditorFeature from '../components/use-editor-feature';

export const FONT_SIZE_SUPPORT_KEY = '__experimentalFontSize';
export const FONT_SIZE_SUPPORT_KEY = 'fontSize';

/**
* Filters registered block settings, extending attributes to include
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/heading/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"color": {
"link": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true,
"__experimentalSelector": {
"core/heading/h1": "h1",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"html": false,
"inserter": true,
"lightBlockWrapper": true,
"__experimentalFontSize": true,
"fontSize": true,
"color": {
"textColor": true,
"backgroundColor": true
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"color": {
"link": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true,
"__experimentalSelector": "p",
"__unstablePasteTextInline": true
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-author/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"supports": {
"html": false,
"lightBlockWrapper": true,
"__experimentalFontSize": true,
"fontSize": true,
"color": {
"gradients": true,
"link": true
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comments-count/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"color": {
"gradients": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true
}
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comments-form/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"gradients": true,
"link": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true
}
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comments/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"wide",
"full"
],
"__experimentalFontSize": true,
"fontSize": true,
"color": {
"gradients": true,
"link": true
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"color": {
"gradients": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true
}
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-excerpt/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"supports": {
"html": false,
"lightBlockWrapper": true,
"__experimentalFontSize": true,
"fontSize": true,
"color": {
"gradients": true,
"link": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"supports": {
"html": false,
"lightBlockWrapper": true,
"__experimentalFontSize": true,
"fontSize": true,
"color": {
"gradients": true,
"link": true
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-tags/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"supports": {
"html": false,
"lightBlockWrapper": true,
"__experimentalFontSize": true,
"fontSize": true,
"color": {
"gradients": true,
"link": true
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"color": {
"gradients": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true,
"__experimentalSelector": {
"core/post-title/h1": "h1",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/site-tagline/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"color": {
"gradients": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true
}
}
2 changes: 1 addition & 1 deletion packages/block-library/src/site-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"color": {
"gradients": true
},
"__experimentalFontSize": true,
"fontSize": true,
"__experimentalLineHeight": true
}
}
2 changes: 1 addition & 1 deletion packages/edit-navigation/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function removeNavigationBlockSettingsUnsupportedFeatures( settings, name ) {
'anchor',
'customClassName',
'color',
'__experimentalFontSize',
'fontSize',
] ),
customClassName: false,
},
Expand Down
10 changes: 5 additions & 5 deletions phpunit/class-block-supported-styles-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ function test_named_font_size() {
$block_type_settings = array(
'attributes' => array(),
'supports' => array(
'__experimentalFontSize' => true,
'fontSize' => true,
),
'render_callback' => true,
);
Expand Down Expand Up @@ -401,7 +401,7 @@ function test_custom_font_size() {
$block_type_settings = array(
'attributes' => array(),
'supports' => array(
'__experimentalFontSize' => true,
'fontSize' => true,
),
'render_callback' => true,
);
Expand Down Expand Up @@ -574,7 +574,7 @@ function test_all_supported() {
'gradients' => true,
'link' => true,
),
'__experimentalFontSize' => true,
'fontSize' => true,
'__experimentalLineHeight' => true,
'align' => true,
),
Expand Down Expand Up @@ -618,7 +618,7 @@ function test_one_supported() {
$block_type_settings = array(
'attributes' => array(),
'supports' => array(
'__experimentalFontSize' => true,
'fontSize' => true,
),
'render_callback' => true,
);
Expand Down Expand Up @@ -664,7 +664,7 @@ function test_render_callback_required() {
'gradients' => true,
'link' => true,
),
'__experimentalFontSize' => true,
'fontSize' => true,
'__experimentalLineHeight' => true,
),
);
Expand Down