Skip to content

Move inline CSS from App render to static App.css#10

Draft
Copilot wants to merge 2 commits intofeat/upgrade-to-jsxfrom
copilot/sub-pr-9
Draft

Move inline CSS from App render to static App.css#10
Copilot wants to merge 2 commits intofeat/upgrade-to-jsxfrom
copilot/sub-pr-9

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

The entire stylesheet was embedded as a JSX <style> string inside App's render, causing style recalculation on every state change (e.g., accordion toggles).

Changes

  • src/App.css — extracted all styles into a static file; Vite bundles and fingerprints it at build time
  • src/App.jsx — replaced <style>{...}</style> block with import "./App.css"
  • index.html — replaced the @import URL inside the CSS string with a proper <link rel="stylesheet"> for Google Fonts, alongside the existing preconnect hints

Before:

return (
  <>
    <style>{`
      @import url('https://fonts.googleapis.com/...');
      *, *::before, *::after { box-sizing: border-box; }
      body { margin: 0; font-family: "Inter", ... }
      /* ~160 more lines */
    `}</style>
    <section className="container">...

After:

// App.jsx
import "./App.css";
// ...
return <><section className="container">...

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: john20xdoe <14521605+john20xdoe@users.noreply.github.com>
Copilot AI changed the title [WIP] Update JSX upgrade based on feedback in PR #9 Move inline CSS from App render to static App.css Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants