Sharepoint Oneline and PowerBI webpart aspect ratio

Copper Contributor

If I use the PowerBI webpart to embed a report into a Sharepoint page, there is a padding of 20px added to the bottom of the report. 

 

Screenshot 2023-01-22 081627.png

In the above screenshot, the report is 16:9, and the orange line is the border of the report.

Looking through the CSS, the webpart height is calculated as padding-top: calc(56.25% + 20px); The height of 56.25% of the width is 16:9, perfect, but why is that 20px additional padding there?

I don't have access to edit the css on the site to correct this. Any ideas?
 

1 Reply
You can use React Script editor webpart to overwrite the CSS and add you own (as in remove padding etc). Why it's there is something we have to ask the engineers :D


https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor