Skip to content

Normalize inherited style output - #26

Merged
vytisbulkevicius merged 1 commit into
developmentfrom
codex/normalize-inherited-styles
Nov 16, 2026
Merged

vytisbulkevicius merged 1 commit into
developmentfrom
codex/normalize-inherited-styles

Conversation

@selul

@selul selul commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Eduacademy copies typography, color and button values from Neve into an inline style block. Those values now enter that block as CSS text only, with any markup removed.

What changed

  • Inherited Neve styles — Assets_Manager::enqueue_style() strips tags from the inherited CSS variables before adding them inline. This covers both the frontend and the editor stylesheet, which share this path.

  • Unchanged output — valid colors, font families, weights, sizes and the button radius render as before.

  • Coverage — tests/test-assets-manager.php checks that a font weight with markup becomes plain CSS.

QA

  1. Activate Neve, set a typography font weight and a global color in Appearance → Customize, then switch to Eduacademy.

    Expect: the frontend uses the same weight and color as before, and the page source shows them as --neve-… variables in the inline style.

@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for c05a7ed is ready 🛎️!

@pirate-bot pirate-bot left a comment •

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.

🟢 Approved

Approved: inherited Neve values now enter the inline style without markup, and valid values render as before.

Validation details
  • Files reviewed: 2/2 changed files.
  • The frontend, editor and welcome-notice styles all reach the inline style through Assets_Manager::enqueue_style().
  • Valid colors, font families, weights, sizes and the radius contain no <, so stripping leaves them unchanged.
  • The new test passes at HEAD on PHP 7.4 with PHPUnit 6.5.14 [R12].
  • On the base tree, the new test fails: cd /var/www/html/wp-content/themes/eduacademy-base && set -o pipefail; timeout 280 vendor/bin/phpunit --filter 'Test_Ass… printed Failed asserting that ':root{--neve-font-weight-body:<em>700</em>;}' contains "--neve-font-weight-body:700;". (run R13)
Untested areas
  • The installed Neve version and theme_mod_* filter outputs were not checked.
  • The checkout path breaks the test bootstrap's theme slug. The tests ran from theme-directory copies.

🤖 Automated review · run code-review-agent_6af70469c5a629.48975411.


🤖 Review agent — review posted ✅ on c05a7ed0 · approved · 0 findings · 9 min

Run code-review-agent_6af70469c5a629.48975411 · trail

@vytisbulkevicius
vytisbulkevicius merged commit acfeb21 into development Nov 16, 2026
5 checks passed
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.

3 participants