@flodesk/grain 11.72.0 → 11.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { getCssVar, isNumber, isString, u } from '.';
2
2
  import { vars, varInfo } from '../variables';
3
- import { getDimension } from './responsive';
3
+ import { getDimension, getSpace } from './responsive';
4
4
  export const isColorVar = color => color in vars.colors;
5
5
  export const getColor = color => {
6
6
  if (color in vars.colors) {
@@ -61,4 +61,9 @@ export const getBorder = function (borderSide) {
61
61
  if (borderSide in sidesObj) {
62
62
  return sidesObj[borderSide].map(side => "".concat(getSide(side), ": ").concat(value)).join(';');
63
63
  }
64
+ };
65
+ export const getOpticalPaddingY = padding => {
66
+ if (!Boolean(padding)) return;
67
+ const textExtraTopSpace = "calc((var(--grn-lineHeight-global) - var(--grn-cap)) / 2)";
68
+ return "calc(".concat(getSpace(padding), " - ").concat(textExtraTopSpace, ")");
64
69
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "11.72.0",
3
+ "version": "11.73.0",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "types": "es/types/index.d.ts",