Skip to content

Fix user profile/edit SCF field table layout#362

Open
meravi wants to merge 3 commits intoWordPress:trunkfrom
meravi:fix/user-profile-layout-349
Open

Fix user profile/edit SCF field table layout#362
meravi wants to merge 3 commits intoWordPress:trunkfrom
meravi:fix/user-profile-layout-349

Conversation

@meravi
Copy link

@meravi meravi commented Feb 21, 2026

Fixes #349

Summary

SCF fields rendered on user profile (profile.php) and edit user (user-edit.php) screens use WordPress table.form-table markup. This can cause label/input alignment and width issues compared to core profile fields.

Changes

  • Add scoped CSS only on profile.php and user-edit.php
  • Improve label width + vertical alignment
  • Ensure inputs and Select2 use a consistent usable width
  • Add responsive stacking on small screens

Tested

  • WordPress 6.9.1
  • Secure Custom Fields 6.8.0

Contributor

  • GitHub: @meravi
  • WordPress.org: ravikhadka

Screenshots

Before:
before-fix

After:
user-field-fix

@github-actions
Copy link

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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props ravikhadka, cbravobernal, yanmetelitsa.

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

@meravi
Copy link
Author

meravi commented Feb 23, 2026

Hey @kraftbj, just pinging you for a review on this PR. I’d really appreciate it if you could take a look. Thanks!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses layout/alignment issues for Secure Custom Fields (SCF) fields on WordPress user profile (profile.php) and edit user (user-edit.php) admin screens by injecting scoped CSS to better match core table.form-table styling.

Changes:

  • Adds an admin_head hook to output scoped CSS on profile/edit-user screens.
  • Introduces CSS rules to normalize label width/alignment and input/Select2 widths.
  • Adds a responsive rule to stack label/input cells on small screens.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Field markup issues on edit User page

2 participants