How to Inject Custom CSS in admin panel to customize a specific type field

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:
  1. Generate a new custom plugin via the Strapi CLI
  2. Create a ./admin/src/styles/global.css with the desired overrides
  3. Import the stylesheet inside of ./admin/src/index.js (or ./admin/src/index.tsx with typescript plugin) e.g.
import "./styles/global.css";
  1. Enable your custom plugin inside of your Strapi project
...
 "my-plugin": {
    enabled: true,
    resolve: "./src/plugins/my-plugin",
  },
  1. Any other code generated inside the ./server directory, as well as any code associated with custom admin panels e.g. ./admin/src/pages can be removed.
1 Like