@flodesk/grain 11.66.2 → 11.67.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,7 +1,7 @@
|
|
|
1
1
|
const legacyVariables = "\n :root {\n --grn-textbox-textSize-s: var(--grn-text-s);\n }\n";
|
|
2
2
|
export const borderVariables = "\n :root {\n --grn-border-size: 1px;\n }\n";
|
|
3
|
-
const capValue = "\n :root {\n @supports not (font-size: 1cap) { --grn-cap-value: 0.74em }\n @supports (font-size: 1cap) { --grn-cap-value: 1cap }\n }\n";
|
|
4
|
-
export const capVariables = "\n :root {\n --grn-cap: var(--grn-cap-value);\n }\n";
|
|
3
|
+
const capValue = "\n :root {\n @supports not (font-size: 1cap) { --grn-cap-value: 0.74em }\n @supports (font-size: 1cap) { --grn-cap-value: 1cap }\n\n @supports not (height: 1lh) { --grn-lh-value: var(--grn-lineHeight-global) }\n @supports (height: 1lh) { --grn-lh-value: 1lh }\n }\n";
|
|
4
|
+
export const capVariables = "\n :root {\n --grn-cap: var(--grn-cap-value);\n --grn-lh: var(--grn-lh-value);\n\n --grn-cap-lh-offset: calc((var(--grn-lh) - var(--grn-cap)) / 2);\n --grn-cap-lh-offset-neg: calc((var(--grn-lh) - var(--grn-cap)) / -2);\n }\n";
|
|
5
5
|
export const fieldVariables = "\n :root, [data-theme] {\n --grn-field-paddingX: var(--grn-space-s2);\n --grn-field-paddingX-m: var(--grn-space-s2);\n --grn-field-paddingX-l: var(--grn-textbox-paddingX-l);\n\n --grn-field-border-color: var(--grn-color-fade3);\n --grn-field-border-color-hover: var(--grn-color-fade6);\n --grn-field-border-color-focus: var(--grn-color-shade9);\n --grn-field-border-color-disabled: var(--grn-color-shade5);\n --grn-field-background-disabled: var(--grn-color-shade2);\n --grn-field-placeholder-color: var(--grn-color-shade7);\n }\n";
|
|
6
6
|
const experiments = "\n [data-experiment-compact-textbox=\"true\"] {\n --grn-textBoxHeight: 36px;\n\n --grn-textbox-height-m: 36px;\n --grn-textbox-paddingX-m: var(--grn-space-s2);\n }\n :root [data-experiment-lighter-fields='true'],\n [data-theme][data-experiment-lighter-fields='true'] {\n --grn-field-border-color: var(--grn-color-fade2);\n }\n\n [data-experiment-match-button-and-field-padding=\"true\"] {\n --grn-field-paddingX: 14px;\n --grn-field-paddingX-m: 14px;\n --grn-textbox-paddingX-m: 14px;\n }\n";
|
|
7
7
|
export const textboxVariables = "\n :root {\n --grn-textbox-height-s: 28px;\n --grn-textbox-paddingX-s: var(--grn-space-s);\n --grn-textbox-radius-s: var(--grn-radius-xs);\n --grn-textbox-text-s: var(--grn-text-s);\n\n --grn-textbox-height-m: 40px;\n --grn-textbox-paddingX-m: var(--grn-space-m);\n --grn-textbox-radius-m: var(--grn-radius-s);\n --grn-textbox-text-m: var(--grn-text-m);\n\n --grn-textbox-height-l: 48px;\n --grn-textbox-paddingX-l: 18px;\n --grn-textbox-radius-l: var(--grn-radius-m);\n --grn-textbox-text-l: var(--grn-text-m);\n }\n";
|
package/es/styles/variables.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const variables = "\n :root {\n --grn-unit: 8px;\n }\n\n :root {\n --grn-text-s: 12px;\n --grn-text-m: 14px;\n --grn-text-l: 18px;\n --grn-text-xl: 24px;\n --grn-text-xxl: 30px;\n }\n\n /* text size \u2715 ~1.2 */\n :root {\n --grn-icon-s: 14px;\n --grn-icon-m: 18px;\n --grn-icon-l: 22px;\n --grn-icon-xl: 28px;\n --grn-icon-xxl: 36px;\n }\n\n :root {\n --grn-weight-normal: 400;\n --grn-weight-medium: 500;\n }\n\n :root {\n --grn-space-xs: calc(var(--grn-unit) / 2);\n --grn-space-s: calc(var(--grn-unit) * 1);\n --grn-space-s2: calc(var(--grn-unit) * 1.5);\n --grn-space-m: calc(var(--grn-unit) * 2);\n --grn-space-l: calc(var(--grn-unit) * 3);\n --grn-space-l2: calc(var(--grn-unit) * 4);\n --grn-space-xl: calc(var(--grn-unit) * 5);\n --grn-space-xl2: calc(var(--grn-unit) * 6);\n --grn-space-xxl: calc(var(--grn-unit) * 7);\n }\n\n :root {\n --grn-radius-xs: 3px;\n --grn-radius-s: 6px;\n --grn-radius-m: 8px;\n --grn-radius-l: 10px;\n }\n\n :root:has(body[data-experiment-squircle=\"true\"]) {\n --rr:
|
|
1
|
+
const variables = "\n :root {\n --grn-unit: 8px;\n }\n\n :root {\n --grn-text-s: 12px;\n --grn-text-m: 14px;\n --grn-text-l: 18px;\n --grn-text-xl: 24px;\n --grn-text-xxl: 30px;\n }\n\n /* text size \u2715 ~1.2 */\n :root {\n --grn-icon-s: 14px;\n --grn-icon-m: 18px;\n --grn-icon-l: 22px;\n --grn-icon-xl: 28px;\n --grn-icon-xxl: 36px;\n }\n\n :root {\n --grn-weight-normal: 400;\n --grn-weight-medium: 500;\n }\n\n :root {\n --grn-space-xs: calc(var(--grn-unit) / 2);\n --grn-space-s: calc(var(--grn-unit) * 1);\n --grn-space-s2: calc(var(--grn-unit) * 1.5);\n --grn-space-m: calc(var(--grn-unit) * 2);\n --grn-space-l: calc(var(--grn-unit) * 3);\n --grn-space-l2: calc(var(--grn-unit) * 4);\n --grn-space-xl: calc(var(--grn-unit) * 5);\n --grn-space-xl2: calc(var(--grn-unit) * 6);\n --grn-space-xxl: calc(var(--grn-unit) * 7);\n }\n\n :root {\n --grn-radius-xs: 3px;\n --grn-radius-s: 6px;\n --grn-radius-m: 8px;\n --grn-radius-l: 10px;\n }\n\n :root:has(body[data-experiment-squircle=\"true\"]) {\n --rr: 1.8375;\n\n --grn-radius-xs: calc(3px * var(--rr));\n --grn-radius-s: calc(6px * var(--rr));\n --grn-radius-m: calc(8px * var(--rr));\n --grn-radius-l: calc(10px * var(--rr));\n }\n [data-experiment-squircle=\"true\"] * {\n corner-shape: squircle;\n }\n [data-experiment-squircle=\"true\"] .extgwng0,\n [data-experiment-squircle=\"true\"] .ez8kn7b1 {\n corner-shape: round !important;\n }\n\n\n [data-experiment-new-brand-radii=\"true\"] {\n --grn-radius-xs: 4px;\n --grn-radius-s: 8px;\n --grn-radius-m: 12px;\n --grn-radius-l: 16px;\n }\n\n [data-experiment-squircle=\"true\"][data-experiment-new-brand-radii=\"true\"] {\n --rr: 1.8375;\n\n --grn-radius-xs: calc(4px * var(--rr));\n --grn-radius-s: calc(8px * var(--rr));\n --grn-radius-m: calc(12px * var(--rr));\n --grn-radius-l: calc(16px * var(--rr));\n }\n\n :root {\n --grn-transition-slow: 400ms;\n --grn-transition-fast: 200ms;\n --grn-transition-xFast: 160ms;\n --grn-transition-xxFast: 80ms;\n }\n";
|
|
2
2
|
export default variables;
|