Skip to content

Make layout compatible with wp7.0#4497

Open
girishpanchal30 wants to merge 3 commits into
developmentfrom
bugfix/4496
Open

Make layout compatible with wp7.0#4497
girishpanchal30 wants to merge 3 commits into
developmentfrom
bugfix/4496

Conversation

@girishpanchal30
Copy link
Copy Markdown
Contributor

Summary

Fixed the layout's style to make it compatible with WordPress 7.0.

Check before Pull Request is ready:

Closes #4496

@girishpanchal30 girishpanchal30 requested a review from Copilot May 12, 2026 12:28
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label May 12, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label May 12, 2026
@pirate-bot
Copy link
Copy Markdown
Collaborator

pirate-bot commented May 12, 2026

Plugin build for ec21ec6 is ready 🛎️!

Copy link
Copy Markdown

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

Adds a WP 7.x compatibility stylesheet intended to fix small admin/customizer layout regressions introduced by WordPress 7 UI changes.

Changes:

  • Enqueue a new WP7-specific admin stylesheet from the Customizer loader on newer WP versions.
  • Add a new assets/scss/wp7.scss entry to the Grunt SASS build and CSS minification pipeline.
  • Introduce WP7 CSS overrides for sizing controls and core UI button/dashicon alignment.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
inc/customizer/loader.php Enqueues a new admin stylesheet conditionally based on WordPress version.
grunt/sass.js Adds compilation target for assets/scss/wp7.scssassets/css/wp7.css.
grunt/cssmin.js Adds minification target for assets/css/wp7.cssassets/css/wp7.min.css.
assets/scss/wp7.scss New WP7 compatibility CSS overrides affecting Neve controls and .wp-core-ui buttons.

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

Comment thread inc/customizer/loader.php
Comment thread inc/customizer/loader.php Outdated
Comment thread assets/scss/wp7.scss Outdated
Comment thread assets/scss/wp7.scss
Comment on lines +1 to +14
.neve-responsive-sizing button.link {
min-height: 40px;
}

.wp-core-ui .button .dashicons,
.wp-core-ui .button-primary .dashicons,
.wp-core-ui .button-secondary .dashicons {
line-height: 1;
}

.wp-core-ui .button-link,
.wp-core-ui .button.button-link {
border: none;
} No newline at end of file
Copy link
Copy Markdown
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel May 15, 2026

Choose a reason for hiding this comment

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

I am not sure about those changes since you are practically reverting the core styles of .wp-core-ui WP 7.0 at a general level.

I will suggest working with a targeted selector. @abaicus @HardeepAsrani, if you have some feedback about this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Soare-Robert-Daniel, I have implemented as you suggested with the latest commit. Please check it and let me know if any changes are needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new selectors look nice. We still have a problem since this change is loaded as an extra file. I do not think I saw this before, and not sure if it is a good pattern.

The current CSS, I think, can go directly into the main CSS files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The current CSS, I think, can go directly into the main CSS files

For the button styles, we can go with what you suggested. However, the input field height has also been updated to 40px in WP 7.x. Because of that, the buttons in the Customizer for WP 6.x look like this:

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That 40px is a good point. Another version that I am thinking will be to add a special class on the component based on the WP version and some CSS based on it, like some sort of versioning:
CleanShot 2026-05-15 at 17 47 20@2x

But a separate file might be simpler. @abaicus @HardeepAsrani, what do you think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Soare-Robert-Daniel Any reason to not set the size straight in the button? Why would we add classes based on version and overcomplicate things?

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

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants