Skip to content

Commit

Permalink
Add support for transform and letter spacing controls in Global Style…
Browse files Browse the repository at this point in the history
…s > Typography > Elements (#58142)

* add supports for text transform and letter spacing to other text based elements

* changed comment
  • Loading branch information
MaggieCabrera authored Jan 26, 2024
1 parent ebab5b6 commit 5cc984d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions packages/blocks/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,33 @@ function filterElementBlockSupports( blockSupports, name, element ) {
return false;
}

// This is only available for heading
// This is only available for heading, button, caption and text
if (
support === 'textTransform' &&
! name &&
! [ 'heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ].includes(
element
! (
[ 'heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ].includes(
element
) ||
element === 'button' ||
element === 'caption' ||
element === 'text'
)
) {
return false;
}

// This is only available for headings
// This is only available for heading, button, caption and text
if (
support === 'letterSpacing' &&
! name &&
! [ 'heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ].includes(
element
! (
[ 'heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ].includes(
element
) ||
element === 'button' ||
element === 'caption' ||
element === 'text'
)
) {
return false;
Expand Down

0 comments on commit 5cc984d

Please sign in to comment.