themeum / kirki

Extending the customizer
https://kirki.org
MIT License
1.26k stars 328 forks source link

CSS Output is not applied in pattern library #2487

Open JiveDig opened 2 years ago

JiveDig commented 2 years ago

Issue description:

I'm just starting to play with block patterns and realized that none of my Kirki CSS is used in the pattern preview when inserting a pattern, either in the sidebar or the "Explore" modal.

Version used:

4.0.24

Using theme_mods or options?

options

To reproduce, click the + at the top left of the block editor, click Patterns tab, and you'll see that none of your styles are loaded fonts, colors, etc. or anything that that would be applied to default content. After inserting the pattern the styles are there.

I'm thinking since Kirki is not registering block editor assets for these styles, they are ignored in the pattern loader.

JiveDig commented 2 years ago

Weird finding... if I put anything in the Additional CSS field, then the Kirki CSS works. No idea how that's related. This is what I added, then the pattern has all of my Customizer output:

image