Forum Discussion
Phidso
4 years agoFrequent Visitor
Editing theme / CSS of embed type "qna"
Hi All! Is it possible to change the styling of a "qna" embed? I'm trying to provide custom CSS / theming to a "qna" type embed but nothing gets applied. I've tried applying via theme key...
Anonymous
4 years agoNot applicable
Hi Phidso ,
Please review the following links, hope they can help you.
Q&A in Power BI embedded analytics
// Parse the theme JSON file into an object
let themeJsonObject = parseJsonfile(path);
let embedConfig = {
…
theme: {
themeJson: themeJsonObject
}
};
let report = powerbi.embed(embedContainer, embedConfig);
Override body style for content in an iframe
An iframe is a 'hole' in your page that displays another web page inside of it. The contents of the iframe is not in any shape or form part of your parent page.
As others have stated, your options are:
- give the file that is being loaded in the iframe the necessary CSS
- if the file in the iframe is from the same domain as your parent, then you can access the DOM of the document in the iframe from the parent.
Best Regards