The easiest way I’ve found to do this is using a custom plugin.
TLDR:
Create a custom plugin to import the desired .css file inside of the root index[.js|.tsx] file.
Step by Step:
- Generate a new custom plugin via the Strapi CLI
- Create a
./admin/src/styles/global.csswith the desired overrides - Import the stylesheet inside of
./admin/src/index.js(or./admin/src/index.tsxwith typescript plugin) e.g.
import "./styles/global.css";
- Enable your custom plugin inside of your Strapi project
...
"my-plugin": {
enabled: true,
resolve: "./src/plugins/my-plugin",
},
- Any other code generated inside the
./serverdirectory, as well as any code associated with custom admin panels e.g../admin/src/pagescan be removed.