ItsJonQ / g2

✨ An experimental reimagining of WordPress components
http://g2-components.com/
MIT License
105 stars 12 forks source link

FontSizePicker: Issues understanding custom values #187

Closed ItsJonQ closed 3 years ago

ItsJonQ commented 3 years ago

Discovered this when attempting to integrate with Gutenberg.

It's not working currently work interfacing with these sizes:

[
  {
    "name": "small",
    "slug": "small",
    "size": "calc(var(--wp--preset--font-size--normal) / var(--wp--custom--typo--scale))"
  },
  {
    "name": "Normal",
    "slug": "normal",
    "size": "calc(var(--wp--custom--typo--root-size) * 1px + var(--wp--custom--typo--adaptive-ratio) * 1vw)"
  },
  {
    "name": "Medium",
    "slug": "medium",
    "size": "calc(var(--wp--preset--font-size--normal) * var(--wp--custom--typo--scale))"
  },
  {
    "name": "large",
    "slug": "large",
    "size": "calc(var(--wp--preset--font-size--medium) * var(--wp--custom--typo--scale))"
  },
  {
    "name": "Huge",
    "slug": "huge",
    "size": "calc(var(--wp--preset--font-size--large) * var(--wp--custom--typo--scale))"
  }
]
ItsJonQ commented 3 years ago

Maybe due to this update: https://github.com/ItsJonQ/g2/issues/182