Skip to content

Commit

Permalink
Subscriptions: Adjust the button width when the button is not on a ne…
Browse files Browse the repository at this point in the history
…w line (#41156)
  • Loading branch information
scruffian authored Jan 28, 2025
1 parent 6cd9bb7 commit fe927e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-31063
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Bug fix for Subscriptions block button
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ function get_element_styles_from_attributes( $attributes ) {

// Account for custom margins on inline forms.
$submit_button_styles .= true === get_attribute( $attributes, 'buttonOnNewLine' )
? sprintf( 'width: calc(100%% - %dpx);', get_attribute( $attributes, 'spacing', DEFAULT_SPACING_VALUE ) )
: 'width: 100%;';
? 'width: 100%;'
: sprintf( 'width: calc(100%% - %dpx);', get_attribute( $attributes, 'spacing', DEFAULT_SPACING_VALUE ) );
}

$font_size = get_attribute( $attributes, 'customFontSize', DEFAULT_FONTSIZE_VALUE );
Expand Down

0 comments on commit fe927e2

Please sign in to comment.