Skip to content

Commit

Permalink
Dashboard: Reduce scope of contain: strict to TextPanel (grafana#75499
Browse files Browse the repository at this point in the history
)
  • Loading branch information
leeoniya authored and otilor committed Sep 28, 2023
1 parent f9e9358 commit 8ffbf80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ const getStyles = (theme: GrafanaTheme2) => {
content: css({
label: 'panel-content',
flexGrow: 1,
contain: 'strict',
contain: 'size layout',
}),
headerContainer: css({
label: 'panel-header',
Expand Down
5 changes: 4 additions & 1 deletion public/app/plugins/panel/text/TextPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function TextPanel(props: Props) {
}

return (
<CustomScrollbar autoHeightMin="100%">
<CustomScrollbar autoHeightMin="100%" className={styles.containStrict}>
<DangerouslySetHtmlContent
html={processed.content}
className={styles.markdown}
Expand Down Expand Up @@ -103,4 +103,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
height: 100%;
`
),
containStrict: css({
contain: 'strict',
}),
});
2 changes: 1 addition & 1 deletion public/sass/pages/_dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
padding: $panel-padding;
width: 100%;
flex-grow: 1;
contain: strict;
contain: size layout;
height: calc(100% - #{$panel-header-height});

&--no-padding {
Expand Down

0 comments on commit 8ffbf80

Please sign in to comment.