After extensive testing of this component, I can confirm that there are no issues when a specific size is defined.
Make sure to include /** @jsx jsx */
in your code and then declare jsx by importing it like this
import { jsx } from "theme-ui";
Also, be sure to use the latest version of theme-ui. In my example, I am using version 0.3.1
UPDATE:
Upon further investigation, it seems necessary to create your own component where you can define an iframe because the Embed component does not allow direct changes to some CSS properties.
With theme-ui, you can create an iframe using the Box component by setting the "as" prop like this:
<Box as="iframe" .../>
Check out OwnEmbed.js:
/** @jsx jsx */
import { jsx, Box } from "theme-ui";
// Rest of the JavaScript code goes here...
The implementation of OwnEmbed is similar to the Embed component
In Main.js:
/** @jsx jsx */
import React from "react";
import OwnEmbed from "./OwnEmbed";
// Rest of the JavaScript code for Main component goes here...
By highlighting the element in the browser, you will see the correct size reflected.
https://i.stack.imgur.com/parGC.png
For more information, refer to this link: Change size Embed from theme-ui