WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
323 stars 51 forks source link

De-activated font faces are not removed when saving a theme #656

Open matiasbenedetto opened 4 months ago

matiasbenedetto commented 4 months ago

What

If specific font faces are deactivated and the changes are saved in the editor, and after that the theme is saved using CBT, the resulting theme still have the de-activated font faces.

Screenscast

Screencast from 30-05-24 12:52:39.webm

Expected

The deactivated font faces should be removed from the saved theme.

pbking commented 4 months ago

Ahh, I tried to reproduce but couldn't until I realized (with the help of your video) that it only happens when SOME (but not ALL) of the font faces are deactivated.

Relatedly (I think...), if you deactivate SOME of the font faces (for example, 3 of an available 6) then the Font Library shows that 3/3 variants are active (not 3/6 as I would expect). However if you deactivate all of the Font Faces then 0/6 are shown instead.

So deactivating (and saving) ALL of the Font Faces causes the entire Font Family to be removed. But deactivating (and saving) SOME of the Font Faces results in NONE of the Font Faces to be removed.