Skip to content

Login/out block: Add button block class names to the submit button#76746

Merged
carolinan merged 2 commits intotrunkfrom
update/login-button-class
Mar 24, 2026
Merged

Login/out block: Add button block class names to the submit button#76746
carolinan merged 2 commits intotrunkfrom
update/login-button-class

Conversation

@carolinan
Copy link
Copy Markdown
Contributor

@carolinan carolinan commented Mar 21, 2026

What?

Closes #50466

When the login form option is selected, and a block theme is active, add these CSS classes to the submit button, so that it can be styled with theme.json:

wp-block-button__link
wp-element-button

Props @justintadlock

Testing Instructions

  1. Activate a block theme that styles buttons
  2. Insert a login/out block
  3. In the block settings sidebar, enable the option "Display login as form"
  4. Save and view the front while logged out (or in an incognito tab :) )
  5. Confirm that the submit button is no longer unstyled, and matches the button block / button element

Screenshots

Before:
The login form with a submit button that uses the browser default styles

After:
The login form with a styled submit button with a black background and border radius

When the login form option is selected, and a block theme is active, add these CSS classes to the submit button, so that it can be styled with theme.json:

wp-block-button__link
wp-element-button
@carolinan carolinan added [Type] Enhancement A suggestion for improvement. [Block] Login/out Affects the Login/out Block labels Mar 21, 2026
@github-actions github-actions bot added the [Package] Block library /packages/block-library label Mar 21, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 21, 2026

Flaky tests detected in d6859b1.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23435591198
📝 Reported issues:

@carolinan carolinan marked this pull request as ready for review March 21, 2026 06:43
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 21, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: justintadlock <greenshady@git.wordpress.org>
Co-authored-by: bgardner <bgardner@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Copy Markdown
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@carolinan carolinan merged commit 1f88fce into trunk Mar 24, 2026
40 checks passed
@carolinan carolinan deleted the update/login-button-class branch March 24, 2026 08:29
@github-actions github-actions bot added this to the Gutenberg 22.9 milestone Mar 24, 2026
adamsilverstein pushed a commit that referenced this pull request Mar 31, 2026
…76746)

* Login/out block: Add button block class names to the submit button

When the login form option is selected, and a block theme is active, add these CSS classes to the submit button, so that it can be styled with theme.json:

wp-block-button__link
wp-element-button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Login/out Affects the Login/out Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .wp-element-button class to Login/out form button output

2 participants