docs(modal): reorganize Styling and add Sizing to Content section - #4689
docs(modal): reorganize Styling and add Sizing to Content section#4689brandyscarney wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| :::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. |
There was a problem hiding this comment.
The Style Placement section has been removed since v6 so I deleted this entire note: 997fe9e
| <SheetScrollingContentExample /> | ||
|
|
||
| ## Styling | ||
| ## Theming |
There was a problem hiding this comment.
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.
| <ThemeExample /> | ||
|
|
||
| ### Animations | ||
| ## Animations |
There was a problem hiding this comment.
I promoted Animations out of Theming because it doesn't actually change any styles.
There was a problem hiding this comment.
Updated older documentation so any future deployments would be accurate.
There was a problem hiding this comment.
Do you expect any of the archived versions to be unfrozen? I can understand v7 but v6 seems very unlikely.
There was a problem hiding this comment.
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.
aeeb3cf to
8bc0246
Compare
8bc0246 to
80cb755
Compare
| [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. |
There was a problem hiding this comment.
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.
thetaPC
left a comment
There was a problem hiding this comment.
LGTM, thank you! Minor things.
|
|
||
| :::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. |
There was a problem hiding this comment.
| 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. |
| 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 */ |
There was a problem hiding this comment.
Suggestion to uppercase the comment since it's important or maybe move it outside and bold it. The same goes for the other comment.
There was a problem hiding this comment.
Do you expect any of the archived versions to be unfrozen? I can understand v7 but v6 seems very unlikely.
Description
Sizing to Contentsection detailing how to set--heightto a content size to have the modal resize to its rendered content & added a playground exampleOther information
Previews: