Skip to content

IBX-12720: Aligned the close button with the first text line in header-less modals - #2239

Open
GrabowskiM wants to merge 1 commit into
6.0from
IBX-12720-no-header-modal-close-alignment
Open

GrabowskiM wants to merge 1 commit into
6.0from
IBX-12720-no-header-modal-close-alignment

Conversation

@GrabowskiM

@GrabowskiM GrabowskiM commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12720

Description:

The close button in header-less modals was positioned with a fixed top: 22px, tuned for the old typography (16px / 24px body text). b8c23c8 (IBX-12038, DS components) added the design-system global styles to the admin layout CSS, which switched the body text to 14px / 21px, so the X ended up ~4px below the first text line. The button swap to ids-btn in the same commit was not the cause (with the old button and the new typography the offset would be ~5px).

The button is now positioned relative to the body's top padding plus half of the text line height (0.5lh) and centred with translateY(-50%). The body padding shares the same custom property (--ibexa-modal-body-padding-top), so the X stays aligned when the typography, the button size or the padding change.

Applied to both header-less variants:

  • Twig ibexa-modal--no-header – the reported case, used by ~19 modals across packages (product catalog, taxonomy, discounts, sections, languages, trash…).
  • React c-popup--no-header (sub-items bulk actions, tree-builder delete). This one was not visibly misaligned today; it gets the same treatment so it does not drift on the next typography change. It also gets display: flex, so the inline icon is centred in the button instead of sitting on the text baseline.

Measured offset between the X icon centre and the first text line centre:

Before After
Twig modals (1366 / 1440 / 1920) 4px 0.5px (glyph vs line box)
React popup 0.5px 0.5px
Twig / React with 16px / 24px text 2px 0

For QA:

  • Product management > Attribute groups > open a group > Attributes > select an attribute > Delete: the X is aligned with the modal text.
  • Please also check another header-less modal (e.g. Sections > Delete, Tags > Delete, Discounts > Delete) and the sub-items bulk "Send to trash" popup in Content structure.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…r-less modals

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GrabowskiM
GrabowskiM requested a review from a team November 20, 2026 14:01
@ibexa-workflow-automation-1
ibexa-workflow-automation-1 Bot requested review from OstafinL, albozek, alekmick, dew326 and tischsoic and removed request for a team November 20, 2026 14:01
@sonarqubecloud

Copy link
Copy Markdown

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