-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Themes: Support providing border radius presets #67544
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4c1810b
Global Styles: Introduce border radius presets
youknowriad e4dfded
Allow picking presets
youknowriad 5359996
Remove debug code
youknowriad 6baa6d9
Fix no presets case
youknowriad b789786
Add icons
youknowriad 46e9e61
Fix invalid DOM property errors in new icons
aaronrobertshaw 16707ec
Fix CSS custom property name in schema description
aaronrobertshaw ab52ca5
Add radiusSizes to valid settings in global styles
aaronrobertshaw 8314e81
Tweak copy paste references to spacing
aaronrobertshaw 044cd38
Add missing global styles config for radiusSizes
aaronrobertshaw e8ebab5
Update style engine for radius presets
aaronrobertshaw 0fede88
Fix global styles preset control
youknowriad 2bd644e
Fix linting error
aaronrobertshaw 896668c
Try px fallback for unit
aaronrobertshaw fa25589
Fix edge cases around preset handling
aaronrobertshaw e0c17a8
Add backport changelog
aaronrobertshaw b47299c
Clean up unrequired valueFunc properties
aaronrobertshaw e0b81a9
Move constants to dedicated file
aaronrobertshaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| https://github.com/WordPress/wordpress-develop/pull/9406 | ||
|
|
||
| * https://github.com/WordPress/gutenberg/pull/67544 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
packages/block-editor/src/components/border-radius-control/all-input-control.js
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
packages/block-editor/src/components/border-radius-control/constants.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /** | ||
| * WordPress dependencies | ||
| */ | ||
| import { __ } from '@wordpress/i18n'; | ||
| import { | ||
| cornerAll, | ||
| cornerBottomLeft, | ||
| cornerBottomRight, | ||
| cornerTopLeft, | ||
| cornerTopRight, | ||
| } from '@wordpress/icons'; | ||
|
|
||
| export const DEFAULT_VALUES = { | ||
| topLeft: undefined, | ||
| topRight: undefined, | ||
| bottomLeft: undefined, | ||
| bottomRight: undefined, | ||
| }; | ||
|
|
||
| export const RANGE_CONTROL_MAX_SIZE = 8; | ||
|
|
||
| export const EMPTY_ARRAY = []; | ||
|
|
||
| export const CORNERS = { | ||
| all: __( 'Border radius' ), | ||
| topLeft: __( 'Top left' ), | ||
| topRight: __( 'Top right' ), | ||
| bottomLeft: __( 'Bottom left' ), | ||
| bottomRight: __( 'Bottom right' ), | ||
| }; | ||
|
|
||
| export const ICONS = { | ||
| all: cornerAll, | ||
| topLeft: cornerTopLeft, | ||
| topRight: cornerTopRight, | ||
| bottomLeft: cornerBottomLeft, | ||
| bottomRight: cornerBottomRight, | ||
| }; | ||
|
|
||
| export const MIN_BORDER_RADIUS_VALUE = 0; | ||
|
|
||
| export const MAX_BORDER_RADIUS_VALUES = { | ||
| px: 100, | ||
| em: 20, | ||
| rem: 20, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.