-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ToolsPanel: Update typography panel layout #35911
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ export function LetterSpacingEdit( props ) { | |
<LetterSpacingControl | ||
value={ style?.typography?.letterSpacing } | ||
onChange={ onChange } | ||
__unstableInputWidth={ false } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, I'm not sure if passing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've switched this to |
||
/> | ||
); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,8 @@ | |
.block-editor-line-height-control input { | ||
max-width: 100%; | ||
} | ||
|
||
.single-column { | ||
grid-column: span 1; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By looking at https://github.com/WordPress/gutenberg/blob/0160b7f1ccdc806a64eb111b36b4fd9c328ad49a/packages/components/src/input-control/types.ts, it seems like this prop should be of type
string | number | undefined
(and notboolean
) — is this on purpose?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created follow-up PR to address this: #36367.
To correct the
boolean
type here but still override the default I needed to usenull
. For backwards compatibility, we need to provide a default width so setting the__unstableWidth
prop toundefined
doesn't work when wishing to restore full width to the control under the TypographyToolsPanel
.