Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FontFamilyControl: Deprecate 36px default size #67853

Merged
merged 1 commit into from
Dec 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const MyFontFamilyControl = () => {
setFontFamily( newFontFamily );
} }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
);
};
Expand Down
14 changes: 14 additions & 0 deletions packages/block-editor/src/components/font-family/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ export default function FontFamilyControl( {
);
}

if (
! __next40pxDefaultSize &&
( props.size === undefined || props.size === 'default' )
) {
deprecated(
`36px default size for wp.blockEditor.__experimentalFontFamilyControl`,
{
since: '6.8',
version: '7.1',
hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.',
}
);
}

return (
<CustomSelectControl
__next40pxDefaultSize={ __next40pxDefaultSize }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ export const Default = {
},
],
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: true,
},
};
Loading