pixelgrade / customify

Intuitive Website Styling integrated into WordPress' Customizer
GNU General Public License v2.0
28 stars 5 forks source link

[Font] Add support for configuring font variant field to load all available variants #215

Closed vladolaru closed 4 years ago

vladolaru commented 4 years ago

The font variant field (configured via the font-weight - yep, I know :) - entry in the fields config of a certain font control config should support more than true or false.

The case that we are targeting right now is when you have a font for the body, you set the "base" variant, but due to it holding rich content, we can't know what variants will be necessary.

So, introduce this king of config for the font-weight field:

'fields' => [
  'font-size'      => ...,
  'font-weight' => [ 'loadAllVariants' => true ],
  'text-align'     => ...,
],
vladolaru commented 4 years ago

Closed here: https://github.com/pixelgrade/customify/commit/a1a4dc6de2607ab990185ad59daa83da45f90582