Vite admin side - no custom fonts in widgets

With a fresh install of the latest roots/sage I am configuring a custom font by importing a theme.css file into editor.css so I can share it across both frontend and backend. Here’s the content of theme.css:

@theme {
  --font-sans: 'Nudica', sans-serif;
}

@font-face {
  font-family: 'Nudica';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/nudica-light-webfont.woff') format('woff');
}

In admin, regular page edit views are fine and the custom fonts work perfectly.

This works either running hot or after a build (thanks for that fix).

However, they don’t load in widgets.php:

Is there some reason for this?

Fonts are working as expected for me in the pattern manager/inserter when following the font guide from our docs.

For /wp-admin/widgets.php, if you pop open devtools and inspect things you will find your answers:

  • There is no iframed editor for this view
  • The existing CSS loaded on this page is conflicting with styles — see how your fonts are all the default serif? That’s coming from WP’s reset CSS

My bad Ben - you are right that the patterns are fine. I meant to change the title. It’s just widgets.

Sorry.