Skip to content

[ui5-dialog]: compact density has no effect on content padding #14023

Description

@rdord

Bug Description

ui5-dialog (and all popups using PopupsCommon-parameters.css ) ignores compact density when applying content padding. The media-range-based padding vars (--_ui5_popup_content_padding_m_l: 2rem, --_ui5_popup_content_padding_xl: 3rem) are not overridden in compact mode, so a wide dialog under .ui5-content-density-compact still renders 32px horizontal padding instead of 16px.

23 other components in the repo have a @container style(--ui5_content_density: compact) block in their *-parameters.css file. PopupsCommon-parameters.css is missing it.

Affected Component

ui5-dialog / ui5-popup

Expected Behaviour

Under .ui5-content-density-compact, dialog content padding should be 1rem (16px) at all breakpoints, consistent with Fiori compact spec and with how other components handle density.

Isolated Example

https://stackblitz.com/edit/js-t13sqby5?file=index.html

Steps to Reproduce

  1. Add .ui5-content-density-compact to a parent element
  2. Open a ui5-dialog that is wide enough to get media-range="M" or "L"
  3. Inspect computed padding on .ui5-popup-content — it renders 32px instead of 16px

Log Output, Stack Trace or Screenshots

No response

Priority

Low

UI5 Web Components Version

2.26.0

Browser

Chrome

Operating System

No response

Additional Context

ViewSettingsDialog-parameters.css in the same repo correctly implements the compact override pattern.

Proposed fix, add to packages/main/src/themes/base/PopupsCommon-parameters.css:

@container style(--ui5_content_density: compact) {
  :host {
    --_ui5_popup_content_padding_m_l: 1rem;
    --_ui5_popup_content_padding_xl: 1rem;
    --_ui5_popup_header_footer_padding_m_l: 1rem;
    --_ui5_popup_header_footer_padding_xl: 1rem;
  }
}

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions