Open Coordinate-Cat opened 7 months ago
The mysterious margin was confirmed when the background color was added. I tried to solve it with margin: 0;, padding: 0; but could not. There doesn't seem to be any margins in the html tag or in the body tag.
// popup.tsx import { useState } from "react" function IndexPopup() { const [data, setData] = useState("") return ( <div style={{ width: 800, height: 800, margin: 0, padding: 0, backgroundColor: "#9bae48" }}> <h2> Welcome to your{" "} <a href="https://www.plasmo.com" target="_blank" rel="noreferrer"> Plasmo </a>{" "} Extension! </h2> <input onChange={(e) => setData(e.target.value)} value={data} /> <a href="https://docs.plasmo.com" target="_blank" rel="noreferrer"> View Docs </a> </div> ) } export default IndexPopup
// popup.html <!doctype html> <html> <head> <title>__plasmo_static_index_title__</title> <meta charset="utf-8" /> </head> <body style="margin: 0; padding: 0"></body> </html>
It appears that the <!doctype html> description was the cause of the problem.
<!doctype html>
The mysterious margin was confirmed when the background color was added. I tried to solve it with margin: 0;, padding: 0; but could not. There doesn't seem to be any margins in the html tag or in the body tag.