Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/SDPAP-7795-powerbi-ifram…
Browse files Browse the repository at this point in the history
…e-height' into hotfix/1.37.1
  • Loading branch information
dylankelly committed May 15, 2023
2 parents ba8c6ef + e7cb696 commit 7ed1389
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/components/Organisms/Markup/Markup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ $no-padding: 0;
}
}
}
&--auto {
iframe {
max-height: none;
}
}
}
/* Callouts */
Expand Down
6 changes: 5 additions & 1 deletion packages/ripple-nuxt-tide/lib/config/markup-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,17 @@ const parseForLinks = function () {

const pluginIframe = function () {
// wrap iFrames
const wrapperClasses = ['rpl-markup__iframe-container']
this.find('iframe').map((i, el) => {
const iframe = this.find(el)
const wrapperClasses = ['rpl-markup__iframe-container']
// If no height setting from CMS, we give it a default height.
if (!iframe.attr('height')) {
wrapperClasses.push('rpl-markup__iframe-container--default')
}
// If it's a PowerBI embed we remove the max-height setting.
if (iframe.attr('src')?.includes('powerbi.com')) {
wrapperClasses.push(`rpl-markup__iframe-container--auto`)
}
const markup = `<div class="${wrapperClasses.join(' ')}"></div>`
return iframe.wrap(markup)
})
Expand Down

0 comments on commit 7ed1389

Please sign in to comment.