Skip to content

docs(modal): reorganize Styling and add Sizing to Content section - #4689

Open
brandyscarney wants to merge 6 commits into
mainfrom
FW-7731
Open

docs(modal): reorganize Styling and add Sizing to Content section#4689
brandyscarney wants to merge 6 commits into
mainfrom
FW-7731

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Sep 1, 2026

Copy link
Copy Markdown
Member

⚠️ Remove all dev builds before merging ⚠️

Description

Other information

Previews:

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Sep 2, 2026 7:08pm UTC

Request Review

Comment thread docs/api/modal.mdx
:::note
### Styling

If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Style Placement section has been removed since v6 so I deleted this entire note: 997fe9e

Comment thread docs/api/modal.mdx
<SheetScrollingContentExample />

## Styling
## Theming

@brandyscarney brandyscarney Sep 1, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reorganizing the sections into Theming -> Styling to match other components, see: https://ionicframework.com/docs/api/action-sheet#theming

I considered updating the playground directory structure but moving any would break the JP docs.

Comment thread docs/api/modal.mdx
<ThemeExample />

### Animations
## Animations

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I promoted Animations out of Theming because it doesn't actually change any styles.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated older documentation so any future deployments would be accurate.

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.

Do you expect any of the archived versions to be unfrozen? I can understand v7 but v6 seems very unlikely.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had to unfreeze and fix the v6 deployment just last year so while I don't want to have to unfreeze it, I'd rather it have the correct documentation if we ever re-deploy it.

Comment thread docs/api/modal.mdx
Comment on lines +180 to +182
[Controller modals](#controller-modals) are appended to the root of your application, outside of the component that presented them. Component-scoped styles will not reach these modals, so their styles must be applied globally, from a stylesheet that is not scoped to a component.

:::note
[Inline modals](#inline-modals-recommended) stay where they are declared in your template, so component-scoped styles do apply to them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can revert this if desired - but I don't know why inline modals were specified here as needing to be overridden globally. We can target ion-modal directly from the example component.

@brandyscarney
brandyscarney marked this pull request as ready for review September 1, 2026 22:11
@brandyscarney
brandyscarney requested a review from a team as a code owner September 1, 2026 22:11
@brandyscarney brandyscarney changed the title docs(modal): reorganize styling section and add Sizing to Content section docs(modal): reorganize Styling and add Sizing to Content section Sep 1, 2026

@thetaPC thetaPC 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.

LGTM, thank you! Minor things.

Comment thread docs/api/modal.mdx Outdated

:::warning

The height must be set on the modal through the `--height` CSS variable. Setting `height` on the `content` [CSS Shadow Part](#css-shadow-parts) will still resize the modal, but any [Content](./content) inside of it will collapse to a height of `0`, leaving only the header visible.

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.

Suggested change
The height must be set on the modal through the `--height` CSS variable. Setting `height` on the `content` [CSS Shadow Part](#css-shadow-parts) will still resize the modal, but any [Content](./content) inside of it will collapse to a height of `0`, leaving only the header visible.
The height must be set on the modal through the `--height` CSS variable. Setting `height` on the `content` [CSS Shadow Part](#css-shadow-parts) will still resize the modal, but any [Content](./content.mdx) inside of it will collapse to a height of `0`, leaving only the header visible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/api/modal.mdx Outdated
The height must be set on the modal through the `--height` CSS variable. Setting `height` on the `content` [CSS Shadow Part](#css-shadow-parts) will still resize the modal, but any [Content](./content) inside of it will collapse to a height of `0`, leaving only the header visible.

```css
/* Do not do this */

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.

Suggestion to uppercase the comment since it's important or maybe move it outside and bold it. The same goes for the other comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Do you expect any of the archived versions to be unfrozen? I can understand v7 but v6 seems very unlikely.

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.

2 participants