Skip to content

Modal - width and max-width can be set via CSS vars #8351

@mcoker

Description

@mcoker

We have vars for modal width and max-width in core:

--pf-c-modal-box--Width
--pf-c-modal-box--MaxWidth

Ideally we would set those inline, which allows this rule to continue to work, for example, the css property that changes the width/size changes from width to something like flex-basis or whatever, if we want to make some other kind of adjustment along with whatever the user has specified as their custom width, etc.

Here's the current code:

/** Default width of the modal. */
width?: number | string;

const boxStyle = width === -1 ? {} : { width };

<ModalBox
id={boxId}
style={boxStyle}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions