@primer/primitives 11.4.0-rc.b3c35298 → 11.4.0-rc.f798df25
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.
- package/dist/build/platforms/css.js +2 -2
- package/dist/build/schemas/dimensionToken.js +1 -1
- package/dist/build/schemas/dimensionValue.js +1 -1
- package/dist/css/base/typography/typography.css +6 -0
- package/dist/css/functional/themes/dark-colorblind-high-contrast.css +2 -5
- package/dist/css/functional/themes/dark-colorblind.css +2 -5
- package/dist/css/functional/themes/dark-dimmed-high-contrast.css +2 -5
- package/dist/css/functional/themes/dark-dimmed.css +2 -5
- package/dist/css/functional/themes/dark-high-contrast.css +2 -5
- package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +2 -5
- package/dist/css/functional/themes/dark-tritanopia.css +2 -5
- package/dist/css/functional/themes/dark.css +2 -5
- package/dist/css/functional/themes/light-colorblind-high-contrast.css +2 -5
- package/dist/css/functional/themes/light-colorblind.css +2 -5
- package/dist/css/functional/themes/light-high-contrast.css +2 -5
- package/dist/css/functional/themes/light-tritanopia-high-contrast.css +2 -5
- package/dist/css/functional/themes/light-tritanopia.css +2 -5
- package/dist/css/functional/themes/light.css +2 -5
- package/dist/css/functional/typography/typography.css +9 -9
- package/dist/docs/base/typography/typography.json +174 -0
- package/dist/docs/functional/typography/typography.json +9 -9
- package/dist/fallbacks/base/typography/typography.json +6 -0
- package/dist/figma/typography/typography.json +75 -0
- package/dist/internalCss/dark-colorblind-high-contrast.css +2 -5
- package/dist/internalCss/dark-colorblind.css +2 -5
- package/dist/internalCss/dark-dimmed-high-contrast.css +2 -5
- package/dist/internalCss/dark-dimmed.css +2 -5
- package/dist/internalCss/dark-high-contrast.css +2 -5
- package/dist/internalCss/dark-tritanopia-high-contrast.css +2 -5
- package/dist/internalCss/dark-tritanopia.css +2 -5
- package/dist/internalCss/dark.css +2 -5
- package/dist/internalCss/light-colorblind-high-contrast.css +2 -5
- package/dist/internalCss/light-colorblind.css +2 -5
- package/dist/internalCss/light-high-contrast.css +2 -5
- package/dist/internalCss/light-tritanopia-high-contrast.css +2 -5
- package/dist/internalCss/light-tritanopia.css +2 -5
- package/dist/internalCss/light.css +2 -5
- package/dist/styleLint/base/typography/typography.json +174 -0
- package/dist/styleLint/functional/typography/typography.json +27 -27
- package/package.json +1 -1
- package/src/tokens/base/typography/typography.json5 +68 -0
- package/src/tokens/functional/typography/typography.json5 +9 -9
|
@@ -8,12 +8,12 @@ const getCssSelectors = (outputFile) => {
|
|
|
8
8
|
const mode = outputBasename.substring(0, 4) === 'dark' ? 'dark' : 'light';
|
|
9
9
|
return [
|
|
10
10
|
{
|
|
11
|
-
selector: `[data-color-mode="${mode}"][data-${mode}-theme="${themeName}"], [data-color-mode="
|
|
11
|
+
selector: `[data-color-mode="${mode}"][data-${mode}-theme="${themeName}"], [data-color-mode="auto"][data-light-theme="${themeName}"]`,
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
query: '@media (prefers-color-scheme: dark)',
|
|
15
15
|
// [data-color-mode] here is duplicated to increase the specificity so that light mode can't override it when prefers-color-scheme: dark is enabled
|
|
16
|
-
selector: `[data-color-mode][data-color-mode="auto"][data-dark-theme="${themeName}"]
|
|
16
|
+
selector: `[data-color-mode][data-color-mode="auto"][data-dark-theme="${themeName}"]`,
|
|
17
17
|
},
|
|
18
18
|
];
|
|
19
19
|
};
|
|
@@ -12,7 +12,7 @@ export const dimensionToken = baseToken
|
|
|
12
12
|
$extensions: z
|
|
13
13
|
.object({
|
|
14
14
|
'org.primer.figma': z.object({
|
|
15
|
-
collection: collection(['base/size', 'functional/size', 'pattern/size', 'typography']),
|
|
15
|
+
collection: collection(['base/size', 'base/typography', 'functional/size', 'pattern/size', 'typography']),
|
|
16
16
|
scopes: scopes([
|
|
17
17
|
'all',
|
|
18
18
|
'size',
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { schemaErrorMessage } from '../utilities/index.js';
|
|
3
3
|
export const dimensionValue = z.union([
|
|
4
4
|
z.string().superRefine((dim, ctx) => {
|
|
5
|
-
if (!/(^-?[0-9]
|
|
5
|
+
if (!/(^-?[0-9]+\.?[0-9]*(px|rem)$|^-?[0-9]+\.?[0-9]*em$)/.test(dim)) {
|
|
6
6
|
ctx.addIssue({
|
|
7
7
|
code: 'custom',
|
|
8
8
|
message: schemaErrorMessage(`Invalid dimension: "${dim}"`, `Dimension must be a string with a unit (px, rem or em) or 0`),
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
--base-text-lineHeight-relaxed: 1.625; /** Use for longer-form content, smaller text sizes (12-13px), or when increased readability is desired. Good for text that needs extra breathing room. */
|
|
5
5
|
--base-text-lineHeight-snug: 1.375; /** Use for display text, large headings, or short multi-line text where moderate density is needed. Good for hero sections and marketing headlines. */
|
|
6
6
|
--base-text-lineHeight-tight: 1.25; /** Use for single-line text in compact UI elements like labels, badges, buttons, or captions where vertical space is limited. Not recommended for multi-line body text due to reduced readability. */
|
|
7
|
+
--base-text-size-2xl: 2.5rem; /** 40px - Display text for hero sections. */
|
|
8
|
+
--base-text-size-lg: 1.25rem; /** 20px - Medium titles and subtitles. */
|
|
9
|
+
--base-text-size-md: 1rem; /** 16px - Large body text and small titles. */
|
|
10
|
+
--base-text-size-sm: 0.875rem; /** 14px - Default body text size for UI. */
|
|
11
|
+
--base-text-size-xl: 2rem; /** 32px - Large titles and page headings. */
|
|
12
|
+
--base-text-size-xs: 0.75rem; /** 12px - Smallest text size for captions and compact UI elements. */
|
|
7
13
|
--base-text-weight-light: 300;
|
|
8
14
|
--base-text-weight-medium: 500;
|
|
9
15
|
--base-text-weight-normal: 400;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_colorblind_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_colorblind_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_colorblind_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_colorblind_high_contrast"] {
|
|
5
3
|
--button-primary-bgColor-active: #3685f3;
|
|
6
4
|
--button-primary-bgColor-hover: #2a7aef;
|
|
7
5
|
--button-primary-borderColor-disabled: #1158c7;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_colorblind_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_colorblind_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_colorblind_high_contrast"] {
|
|
903
900
|
--button-primary-bgColor-active: #3685f3;
|
|
904
901
|
--button-primary-bgColor-hover: #2a7aef;
|
|
905
902
|
--button-primary-borderColor-disabled: #1158c7;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_colorblind"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_colorblind"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_colorblind"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_colorblind"] {
|
|
5
3
|
--button-primary-bgColor-active: #3685f3;
|
|
6
4
|
--button-primary-bgColor-hover: #2a7aef;
|
|
7
5
|
--button-primary-borderColor-disabled: #1158c7;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_colorblind"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_colorblind"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_colorblind"] {
|
|
903
900
|
--button-primary-bgColor-active: #3685f3;
|
|
904
901
|
--button-primary-bgColor-hover: #2a7aef;
|
|
905
902
|
--button-primary-borderColor-disabled: #1158c7;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_dimmed_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_dimmed_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_dimmed_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_dimmed_high_contrast"] {
|
|
5
3
|
--button-danger-fgColor-active: #ffffff;
|
|
6
4
|
--button-danger-fgColor-hover: #ffffff;
|
|
7
5
|
--button-danger-iconColor-hover: #ffffff;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_dimmed_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_dimmed_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_dimmed_high_contrast"] {
|
|
903
900
|
--button-danger-fgColor-active: #ffffff;
|
|
904
901
|
--button-danger-fgColor-hover: #ffffff;
|
|
905
902
|
--button-danger-iconColor-hover: #ffffff;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_dimmed"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_dimmed"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_dimmed"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_dimmed"] {
|
|
5
3
|
--button-danger-fgColor-active: #ffffff;
|
|
6
4
|
--button-danger-fgColor-hover: #ffffff;
|
|
7
5
|
--button-danger-fgColor-rest: #ea5c53;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-danger-borderColor-active: var(--button-danger-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_dimmed"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_dimmed"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_dimmed"] {
|
|
903
900
|
--button-danger-fgColor-active: #ffffff;
|
|
904
901
|
--button-danger-fgColor-hover: #ffffff;
|
|
905
902
|
--button-danger-fgColor-rest: #ea5c53;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_high_contrast"] {
|
|
5
3
|
--button-primary-bgColor-active: #109135;
|
|
6
4
|
--button-primary-bgColor-disabled: #048f2f;
|
|
7
5
|
--button-primary-bgColor-hover: #08792b;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_high_contrast"] {
|
|
903
900
|
--button-primary-bgColor-active: #109135;
|
|
904
901
|
--button-primary-bgColor-disabled: #048f2f;
|
|
905
902
|
--button-primary-bgColor-hover: #08792b;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_tritanopia_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_tritanopia_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_tritanopia_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_tritanopia_high_contrast"] {
|
|
5
3
|
--button-outline-bgColor-active: #0d419d;
|
|
6
4
|
--button-primary-bgColor-active: #3685f3;
|
|
7
5
|
--button-primary-bgColor-disabled: #5fabfe;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_tritanopia_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_tritanopia_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_tritanopia_high_contrast"] {
|
|
903
900
|
--button-outline-bgColor-active: #0d419d;
|
|
904
901
|
--button-primary-bgColor-active: #3685f3;
|
|
905
902
|
--button-primary-bgColor-disabled: #5fabfe;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark_tritanopia"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark_tritanopia"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark_tritanopia"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark_tritanopia"] {
|
|
5
3
|
--bgColor-sponsors-muted: #db61a21a;
|
|
6
4
|
--button-danger-fgColor-rest: #fa5e55;
|
|
7
5
|
--button-outline-bgColor-active: #0d419d;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_tritanopia"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_tritanopia"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark_tritanopia"] {
|
|
903
900
|
--bgColor-sponsors-muted: #db61a21a;
|
|
904
901
|
--button-danger-fgColor-rest: #fa5e55;
|
|
905
902
|
--button-outline-bgColor-active: #0d419d;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="dark"][data-dark-theme="dark"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="dark"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="dark"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="dark"] {
|
|
5
3
|
--button-danger-fgColor-rest: #fa5e55;
|
|
6
4
|
--button-primary-bgColor-active: #2e9a40;
|
|
7
5
|
--button-primary-bgColor-disabled: #105823;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="dark"] {
|
|
903
900
|
--button-danger-fgColor-rest: #fa5e55;
|
|
904
901
|
--button-primary-bgColor-active: #2e9a40;
|
|
905
902
|
--button-primary-bgColor-disabled: #105823;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="light"][data-light-theme="light_colorblind_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="light_colorblind_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="light_colorblind_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="light_colorblind_high_contrast"] {
|
|
5
3
|
--button-outline-bgColor-active: #033f9d;
|
|
6
4
|
--button-primary-bgColor-active: #075fc8;
|
|
7
5
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--controlKnob-borderColor-rest: var(--control-borderColor-emphasis);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_colorblind_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_colorblind_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_colorblind_high_contrast"] {
|
|
903
900
|
--button-outline-bgColor-active: #033f9d;
|
|
904
901
|
--button-primary-bgColor-active: #075fc8;
|
|
905
902
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="light"][data-light-theme="light_colorblind"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="light_colorblind"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="light_colorblind"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="light_colorblind"] {
|
|
5
3
|
--button-outline-bgColor-active: #0757ba;
|
|
6
4
|
--button-primary-bgColor-active: #075fc8;
|
|
7
5
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_colorblind"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_colorblind"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_colorblind"] {
|
|
903
900
|
--button-outline-bgColor-active: #0757ba;
|
|
904
901
|
--button-primary-bgColor-active: #075fc8;
|
|
905
902
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="light"][data-light-theme="light_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="light_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="light_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="light_high_contrast"] {
|
|
5
3
|
--button-outline-bgColor-active: #033f9d;
|
|
6
4
|
--button-primary-bgColor-active: #03501b;
|
|
7
5
|
--button-primary-bgColor-disabled: #85cb97;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--controlKnob-borderColor-rest: var(--control-borderColor-emphasis);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_high_contrast"] {
|
|
903
900
|
--button-outline-bgColor-active: #033f9d;
|
|
904
901
|
--button-primary-bgColor-active: #03501b;
|
|
905
902
|
--button-primary-bgColor-disabled: #85cb97;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="light"][data-light-theme="light_tritanopia_high_contrast"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="light_tritanopia_high_contrast"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="light_tritanopia_high_contrast"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="light_tritanopia_high_contrast"] {
|
|
5
3
|
--button-outline-bgColor-active: #033f9d;
|
|
6
4
|
--button-primary-bgColor-active: #075fc8;
|
|
7
5
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--controlKnob-borderColor-rest: var(--control-borderColor-emphasis);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_tritanopia_high_contrast"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_tritanopia_high_contrast"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_tritanopia_high_contrast"] {
|
|
903
900
|
--button-outline-bgColor-active: #033f9d;
|
|
904
901
|
--button-primary-bgColor-active: #075fc8;
|
|
905
902
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="light"][data-light-theme="light_tritanopia"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="light_tritanopia"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="light_tritanopia"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="light_tritanopia"] {
|
|
5
3
|
--button-outline-bgColor-active: #0757ba;
|
|
6
4
|
--button-primary-bgColor-active: #075fc8;
|
|
7
5
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_tritanopia"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_tritanopia"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="light_tritanopia"] {
|
|
903
900
|
--button-outline-bgColor-active: #0757ba;
|
|
904
901
|
--button-primary-bgColor-active: #075fc8;
|
|
905
902
|
--button-primary-bgColor-disabled: #92caff;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[data-color-mode="light"][data-light-theme="light"],
|
|
2
|
-
[data-color-mode="
|
|
3
|
-
[data-color-mode="auto"][data-light-theme="light"],
|
|
4
|
-
[data-color-mode="auto"][data-light-theme="light"] ::backdrop {
|
|
2
|
+
[data-color-mode="auto"][data-light-theme="light"] {
|
|
5
3
|
--bgColor-success-emphasis: #1f883d;
|
|
6
4
|
--button-outline-bgColor-active: #0757ba;
|
|
7
5
|
--button-primary-bgColor-active: #197935;
|
|
@@ -898,8 +896,7 @@
|
|
|
898
896
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
899
897
|
}
|
|
900
898
|
@media (prefers-color-scheme: dark) {
|
|
901
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light"]
|
|
902
|
-
[data-color-mode][data-color-mode="auto"][data-dark-theme="light"] ::backdrop {
|
|
899
|
+
[data-color-mode][data-color-mode="auto"][data-dark-theme="light"] {
|
|
903
900
|
--bgColor-success-emphasis: #1f883d;
|
|
904
901
|
--button-outline-bgColor-active: #0757ba;
|
|
905
902
|
--button-primary-bgColor-active: #197935;
|
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
--fontStack-sansSerif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
4
4
|
--fontStack-sansSerifDisplay: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
5
5
|
--fontStack-system: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
6
|
-
--text-body-size-large: 1rem;
|
|
7
|
-
--text-body-size-medium: 0.875rem;
|
|
8
|
-
--text-body-size-small: 0.75rem;
|
|
9
|
-
--text-caption-size: 0.75rem;
|
|
10
6
|
--text-codeBlock-size: 0.8125rem;
|
|
11
7
|
--text-codeInline-size: 0.9285em;
|
|
12
|
-
--text-display-size: 2.5rem;
|
|
13
|
-
--text-subtitle-size: 1.25rem;
|
|
14
|
-
--text-title-size-large: 2rem;
|
|
15
|
-
--text-title-size-medium: 1.25rem;
|
|
16
|
-
--text-title-size-small: 1rem;
|
|
17
8
|
--text-body-lineHeight-large: var(--base-text-lineHeight-normal);
|
|
18
9
|
--text-body-lineHeight-medium: var(--base-text-lineHeight-normal);
|
|
19
10
|
--text-body-lineHeight-small: var(--base-text-lineHeight-relaxed);
|
|
11
|
+
--text-body-size-large: var(--base-text-size-md);
|
|
12
|
+
--text-body-size-medium: var(--base-text-size-sm);
|
|
13
|
+
--text-body-size-small: var(--base-text-size-xs);
|
|
20
14
|
--text-body-weight: var(--base-text-weight-normal);
|
|
21
15
|
--text-caption-lineHeight: var(--base-text-lineHeight-tight);
|
|
16
|
+
--text-caption-size: var(--base-text-size-xs);
|
|
22
17
|
--text-caption-weight: var(--base-text-weight-normal);
|
|
23
18
|
--text-codeBlock-lineHeight: var(--base-text-lineHeight-normal);
|
|
24
19
|
--text-codeBlock-weight: var(--base-text-weight-normal);
|
|
25
20
|
--text-codeInline-weight: var(--base-text-weight-normal);
|
|
26
21
|
--text-display-lineBoxHeight: var(--base-text-lineHeight-snug);
|
|
27
22
|
--text-display-lineHeight: var(--base-text-lineHeight-snug);
|
|
23
|
+
--text-display-size: var(--base-text-size-2xl);
|
|
28
24
|
--text-display-weight: var(--base-text-weight-medium);
|
|
29
25
|
--text-subtitle-lineHeight: var(--base-text-lineHeight-relaxed);
|
|
26
|
+
--text-subtitle-size: var(--base-text-size-lg);
|
|
30
27
|
--text-subtitle-weight: var(--base-text-weight-normal);
|
|
31
28
|
--text-title-lineHeight-large: var(--base-text-lineHeight-normal);
|
|
32
29
|
--text-title-lineHeight-medium: var(--base-text-lineHeight-relaxed);
|
|
33
30
|
--text-title-lineHeight-small: var(--base-text-lineHeight-normal);
|
|
31
|
+
--text-title-size-large: var(--base-text-size-xl);
|
|
32
|
+
--text-title-size-medium: var(--base-text-size-lg);
|
|
33
|
+
--text-title-size-small: var(--base-text-size-md);
|
|
34
34
|
--text-title-weight-large: var(--base-text-weight-semibold);
|
|
35
35
|
--text-title-weight-medium: var(--base-text-weight-semibold);
|
|
36
36
|
--text-title-weight-small: var(--base-text-weight-semibold);
|
|
@@ -144,6 +144,180 @@
|
|
|
144
144
|
"type": "number",
|
|
145
145
|
"description": "Use for single-line text in compact UI elements like labels, badges, buttons, or captions where vertical space is limited. Not recommended for multi-line body text due to reduced readability."
|
|
146
146
|
},
|
|
147
|
+
"base-text-size-2xl": {
|
|
148
|
+
"key": "{base.text.size.2xl}",
|
|
149
|
+
"$extensions": {
|
|
150
|
+
"org.primer.figma": {
|
|
151
|
+
"collection": "base/typography",
|
|
152
|
+
"scopes": ["fontSize"]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"filePath": "src/tokens/base/typography/typography.json5",
|
|
156
|
+
"isSource": true,
|
|
157
|
+
"original": {
|
|
158
|
+
"$value": "2.5rem",
|
|
159
|
+
"$type": "dimension",
|
|
160
|
+
"$description": "40px - Display text for hero sections.",
|
|
161
|
+
"$extensions": {
|
|
162
|
+
"org.primer.figma": {
|
|
163
|
+
"collection": "base/typography",
|
|
164
|
+
"scopes": ["fontSize"]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"key": "{base.text.size.2xl}"
|
|
168
|
+
},
|
|
169
|
+
"name": "base-text-size-2xl",
|
|
170
|
+
"attributes": {},
|
|
171
|
+
"path": ["base", "text", "size", "2xl"],
|
|
172
|
+
"value": "2.5rem",
|
|
173
|
+
"type": "dimension",
|
|
174
|
+
"description": "40px - Display text for hero sections."
|
|
175
|
+
},
|
|
176
|
+
"base-text-size-lg": {
|
|
177
|
+
"key": "{base.text.size.lg}",
|
|
178
|
+
"$extensions": {
|
|
179
|
+
"org.primer.figma": {
|
|
180
|
+
"collection": "base/typography",
|
|
181
|
+
"scopes": ["fontSize"]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"filePath": "src/tokens/base/typography/typography.json5",
|
|
185
|
+
"isSource": true,
|
|
186
|
+
"original": {
|
|
187
|
+
"$value": "1.25rem",
|
|
188
|
+
"$type": "dimension",
|
|
189
|
+
"$description": "20px - Medium titles and subtitles.",
|
|
190
|
+
"$extensions": {
|
|
191
|
+
"org.primer.figma": {
|
|
192
|
+
"collection": "base/typography",
|
|
193
|
+
"scopes": ["fontSize"]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"key": "{base.text.size.lg}"
|
|
197
|
+
},
|
|
198
|
+
"name": "base-text-size-lg",
|
|
199
|
+
"attributes": {},
|
|
200
|
+
"path": ["base", "text", "size", "lg"],
|
|
201
|
+
"value": "1.25rem",
|
|
202
|
+
"type": "dimension",
|
|
203
|
+
"description": "20px - Medium titles and subtitles."
|
|
204
|
+
},
|
|
205
|
+
"base-text-size-md": {
|
|
206
|
+
"key": "{base.text.size.md}",
|
|
207
|
+
"$extensions": {
|
|
208
|
+
"org.primer.figma": {
|
|
209
|
+
"collection": "base/typography",
|
|
210
|
+
"scopes": ["fontSize"]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"filePath": "src/tokens/base/typography/typography.json5",
|
|
214
|
+
"isSource": true,
|
|
215
|
+
"original": {
|
|
216
|
+
"$value": "1rem",
|
|
217
|
+
"$type": "dimension",
|
|
218
|
+
"$description": "16px - Large body text and small titles.",
|
|
219
|
+
"$extensions": {
|
|
220
|
+
"org.primer.figma": {
|
|
221
|
+
"collection": "base/typography",
|
|
222
|
+
"scopes": ["fontSize"]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"key": "{base.text.size.md}"
|
|
226
|
+
},
|
|
227
|
+
"name": "base-text-size-md",
|
|
228
|
+
"attributes": {},
|
|
229
|
+
"path": ["base", "text", "size", "md"],
|
|
230
|
+
"value": "1rem",
|
|
231
|
+
"type": "dimension",
|
|
232
|
+
"description": "16px - Large body text and small titles."
|
|
233
|
+
},
|
|
234
|
+
"base-text-size-sm": {
|
|
235
|
+
"key": "{base.text.size.sm}",
|
|
236
|
+
"$extensions": {
|
|
237
|
+
"org.primer.figma": {
|
|
238
|
+
"collection": "base/typography",
|
|
239
|
+
"scopes": ["fontSize"]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"filePath": "src/tokens/base/typography/typography.json5",
|
|
243
|
+
"isSource": true,
|
|
244
|
+
"original": {
|
|
245
|
+
"$value": "0.875rem",
|
|
246
|
+
"$type": "dimension",
|
|
247
|
+
"$description": "14px - Default body text size for UI.",
|
|
248
|
+
"$extensions": {
|
|
249
|
+
"org.primer.figma": {
|
|
250
|
+
"collection": "base/typography",
|
|
251
|
+
"scopes": ["fontSize"]
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"key": "{base.text.size.sm}"
|
|
255
|
+
},
|
|
256
|
+
"name": "base-text-size-sm",
|
|
257
|
+
"attributes": {},
|
|
258
|
+
"path": ["base", "text", "size", "sm"],
|
|
259
|
+
"value": "0.875rem",
|
|
260
|
+
"type": "dimension",
|
|
261
|
+
"description": "14px - Default body text size for UI."
|
|
262
|
+
},
|
|
263
|
+
"base-text-size-xl": {
|
|
264
|
+
"key": "{base.text.size.xl}",
|
|
265
|
+
"$extensions": {
|
|
266
|
+
"org.primer.figma": {
|
|
267
|
+
"collection": "base/typography",
|
|
268
|
+
"scopes": ["fontSize"]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"filePath": "src/tokens/base/typography/typography.json5",
|
|
272
|
+
"isSource": true,
|
|
273
|
+
"original": {
|
|
274
|
+
"$value": "2rem",
|
|
275
|
+
"$type": "dimension",
|
|
276
|
+
"$description": "32px - Large titles and page headings.",
|
|
277
|
+
"$extensions": {
|
|
278
|
+
"org.primer.figma": {
|
|
279
|
+
"collection": "base/typography",
|
|
280
|
+
"scopes": ["fontSize"]
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"key": "{base.text.size.xl}"
|
|
284
|
+
},
|
|
285
|
+
"name": "base-text-size-xl",
|
|
286
|
+
"attributes": {},
|
|
287
|
+
"path": ["base", "text", "size", "xl"],
|
|
288
|
+
"value": "2rem",
|
|
289
|
+
"type": "dimension",
|
|
290
|
+
"description": "32px - Large titles and page headings."
|
|
291
|
+
},
|
|
292
|
+
"base-text-size-xs": {
|
|
293
|
+
"key": "{base.text.size.xs}",
|
|
294
|
+
"$extensions": {
|
|
295
|
+
"org.primer.figma": {
|
|
296
|
+
"collection": "base/typography",
|
|
297
|
+
"scopes": ["fontSize"]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"filePath": "src/tokens/base/typography/typography.json5",
|
|
301
|
+
"isSource": true,
|
|
302
|
+
"original": {
|
|
303
|
+
"$value": "0.75rem",
|
|
304
|
+
"$type": "dimension",
|
|
305
|
+
"$description": "12px - Smallest text size for captions and compact UI elements.",
|
|
306
|
+
"$extensions": {
|
|
307
|
+
"org.primer.figma": {
|
|
308
|
+
"collection": "base/typography",
|
|
309
|
+
"scopes": ["fontSize"]
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"key": "{base.text.size.xs}"
|
|
313
|
+
},
|
|
314
|
+
"name": "base-text-size-xs",
|
|
315
|
+
"attributes": {},
|
|
316
|
+
"path": ["base", "text", "size", "xs"],
|
|
317
|
+
"value": "0.75rem",
|
|
318
|
+
"type": "dimension",
|
|
319
|
+
"description": "12px - Smallest text size for captions and compact UI elements."
|
|
320
|
+
},
|
|
147
321
|
"base-text-weight-light": {
|
|
148
322
|
"key": "{base.text.weight.light}",
|
|
149
323
|
"$extensions": {
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
284
284
|
"isSource": true,
|
|
285
285
|
"original": {
|
|
286
|
-
"$value": "
|
|
286
|
+
"$value": "{base.text.size.md}",
|
|
287
287
|
"$type": "dimension",
|
|
288
288
|
"$extensions": {
|
|
289
289
|
"org.primer.figma": {
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
311
311
|
"isSource": true,
|
|
312
312
|
"original": {
|
|
313
|
-
"$value": "
|
|
313
|
+
"$value": "{base.text.size.sm}",
|
|
314
314
|
"$type": "dimension",
|
|
315
315
|
"$extensions": {
|
|
316
316
|
"org.primer.figma": {
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
338
338
|
"isSource": true,
|
|
339
339
|
"original": {
|
|
340
|
-
"$value": "
|
|
340
|
+
"$value": "{base.text.size.xs}",
|
|
341
341
|
"$type": "dimension",
|
|
342
342
|
"$extensions": {
|
|
343
343
|
"org.primer.figma": {
|
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
447
447
|
"isSource": true,
|
|
448
448
|
"original": {
|
|
449
|
-
"$value": "
|
|
449
|
+
"$value": "{base.text.size.xs}",
|
|
450
450
|
"$type": "dimension",
|
|
451
451
|
"$extensions": {
|
|
452
452
|
"org.primer.figma": {
|
|
@@ -774,7 +774,7 @@
|
|
|
774
774
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
775
775
|
"isSource": true,
|
|
776
776
|
"original": {
|
|
777
|
-
"$value": "
|
|
777
|
+
"$value": "{base.text.size.2xl}",
|
|
778
778
|
"$type": "dimension",
|
|
779
779
|
"$extensions": {
|
|
780
780
|
"org.primer.figma": {
|
|
@@ -883,7 +883,7 @@
|
|
|
883
883
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
884
884
|
"isSource": true,
|
|
885
885
|
"original": {
|
|
886
|
-
"$value": "
|
|
886
|
+
"$value": "{base.text.size.lg}",
|
|
887
887
|
"$type": "dimension",
|
|
888
888
|
"$extensions": {
|
|
889
889
|
"org.primer.figma": {
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
1103
1103
|
"isSource": true,
|
|
1104
1104
|
"original": {
|
|
1105
|
-
"$value": "
|
|
1105
|
+
"$value": "{base.text.size.xl}",
|
|
1106
1106
|
"$type": "dimension",
|
|
1107
1107
|
"$extensions": {
|
|
1108
1108
|
"org.primer.figma": {
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
1130
1130
|
"isSource": true,
|
|
1131
1131
|
"original": {
|
|
1132
|
-
"$value": "
|
|
1132
|
+
"$value": "{base.text.size.lg}",
|
|
1133
1133
|
"$type": "dimension",
|
|
1134
1134
|
"$extensions": {
|
|
1135
1135
|
"org.primer.figma": {
|
|
@@ -1156,7 +1156,7 @@
|
|
|
1156
1156
|
"filePath": "src/tokens/functional/typography/typography.json5",
|
|
1157
1157
|
"isSource": true,
|
|
1158
1158
|
"original": {
|
|
1159
|
-
"$value": "
|
|
1159
|
+
"$value": "{base.text.size.md}",
|
|
1160
1160
|
"$type": "dimension",
|
|
1161
1161
|
"$extensions": {
|
|
1162
1162
|
"org.primer.figma": {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"--base-text-size-xs": "0.75rem",
|
|
3
|
+
"--base-text-size-sm": "0.875rem",
|
|
4
|
+
"--base-text-size-md": "1rem",
|
|
5
|
+
"--base-text-size-lg": "1.25rem",
|
|
6
|
+
"--base-text-size-xl": "2rem",
|
|
7
|
+
"--base-text-size-2xl": "2.5rem",
|
|
2
8
|
"--base-text-weight-light": 300,
|
|
3
9
|
"--base-text-weight-normal": 400,
|
|
4
10
|
"--base-text-weight-medium": 500,
|