Form sending css information on submission from Gatsby site

Hello! First time here and new to Netlify. I’m currently working on a Gatsby site and trying to implement the netlify forms functionality. I have it working, but it is sending the css along with the form submission. I’m using Emotion Css and have styled form inputs. Since it’s a Gatsby site, I have a ref set up to the forma and am manually submitting the form via this code:

const handleSubmit = (evt) => {
evt.preventDefault();
const form = contactForm.current;
fetch("/contact", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: encode({
    "form-name": form.getAttribute("name"),
    who: whoMap[checked],
    name: name,
    email: email,
    message: message,
  }),
})
  .then((res) => {
    setSent(true);
    resetName();
    resetEmail();
    resetMessage();
  })
  .catch((err) => setError(err.toString()));
};

Encode is just a function that turns all the form data into a urlencoded string. When I check that the output is what I’d expect. Any ideas as to why all the css attributes are coming through and how I can avoid that? Thanks!

Hey @emoRobot!
We just went through something similar over here: 404 response when submitting via AJAX - #10 by jen

Could you please send your Netlify url so we can take a closer look?