fix: stop lightning css from lowering logical properties in prod builds #10277
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 501 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #10277"
general
weight: 0.35
lucferbux
<!-- Tracker (linked, not auto-closing): https://redhat.atlassian.net/browse/RHOAIENG-100823 -->
Problem
In production builds, PatternFly card titles nested inside a card header regain their 24px inline padding, so any layout that places the title beside other content (e.g. the home page "Task shortcuts" cards, where the title sits next to the section icon and description in one column) shows the title indented relative to its description. The deployed CSS is byte-identical to this repo's production build, so the defect is fully reproducible locally. Notably, only the dev server is unaffected — the bug exists solely in minimized production output.
https://redhat.atlassian.net/browse/RHOAIENG-100823
Solution
rspack.LightningCssMinimizerRspackPlugin()with no options defaults totargets: ['fully supports es6'], which makes Lightning CSS lower every CSS logical property (padding-inline-start, …) into physicalpadding-left/padding-rightplus:lang(rtl…)fallback pairs. The lowering inflates the selector specificity of PatternFly's card child padding rule from (0,1,0) to (0,2,0), so it ties with — and, by later source order, beats — PatternFly's contextual.pf-v6-c-card__header .pf-v6-c-card__title { padding: 0 }rule.This disables the
logicalPropertiestransform in every production rspack config that still had the bare minimizer (the host frontend plus the agent-ops, data-connect-hub, data-registry, eval-hub, gen-ai, maas, mlflow, and model-serving modules). automl and autorag already carry the identical setting from #9860, which fixed the same symptom for those two modules; this change extends it to the remaining build pipelines so the whole product ships consistent CSS. Logical properties are kept as-is in the output, which is safe for the browsers RHOAI supports (Chrome 87+, Edge 88+, Firefox 66+, Safari 15+).No markup, component, or SCSS changes are involved — the affected components render correctly as authored once the minimizer stops rewriting their stylesheets.
Evidence
:lang()fallback rules and a headless-Chrome computed-style check on the task-group card DOM reportedpadding-left: 24pxon the card title; after the change, the whole build contains zero:lang()rules and the same check reportspadding-left: 0px, while the card header and body keep their designed 24px padding.home.cy.ts) asserting the task-group card title's computedpadding-left/padding-rightare0px. The mock CI pipeline builds with the production rspack config (cypress:server:build), so the assertion runs against the minimized CSS where the bug lives (it cannot be caught by dev-server runs, which skip the minimizer). Ran it against the full production pipeline (all 12 workspace builds + federation mock servers):home.cy.ts— 3 passing, including the new padding assertion.turbo run lintpasses for the frontend, cypress, and all touched package workspaces (0 new errors).test:cypress-cibuild phase completed with 0 errors).🤖 Generated with Claude Code
Manual testing confirmed the fix for the task title alignment:
<img width="1340" height="850" alt="image" src="https://github.com/user-attachments/assets/4d383135-0c1d-4a06-8528-13fec37c5b43" />
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Production styling now preserves directional spacing rules, helping task-group cards and other layouts retain consistent padding after optimization.
Tests
Added a home-page check that verifies task-group card titles keep the expected horizontal spacing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->