Skip to content

Commit

Permalink
working on compnent tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Dec 18, 2024
1 parent 086fd63 commit 02018d8
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 219 deletions.
113 changes: 101 additions & 12 deletions src/tokens/component/diffBlob.json5
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'dark-high-contrast': {
$value: '{bgColor.success.muted}',
alpha: 0.2,
},
dark: {
alpha: 0.15,
},
Expand All @@ -39,6 +43,10 @@
group: 'component',
scopes: ['fgColor'],
},
'org.primer.overrides': {
'dark-high-contrast': '{fgColor.onEmphasis}',
'light-high-contrast': '{fgColor.onEmphasis}',
},
},
},
bgColor: {
Expand All @@ -51,6 +59,18 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.blue.1}',
'light-tritanopia': '{base.color.blue.1}',
'light-high-contrast': '{base.color.green.5}',
'dark-high-contrast': '{bgColor.success.emphasis}',
'dark-protanopia-deuteranopia': {
$value: '{base.color.blue.4}',
alpha: 0.4,
},
'dark-tritanopia': {
$value: '{base.color.blue.4}',
alpha: 0.4,
},
dark: {
$value: '{base.color.green.4}',
alpha: 0.4,
Expand Down Expand Up @@ -86,13 +106,26 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.blue.1}',
'light-tritanopia': '{base.color.blue.1}',
'dark-high-contrast': '{base.color.green.3}',
'dark-protanopia-deuteranopia': {
$value: '{base.color.blue.3}',
alpha: 0.3,
},
'dark-tritanopia': {
$value: '{base.color.blue.3}',
alpha: 0.3,
},
dark: {
$value: '{base.color.green.3}',
alpha: 0.3,
},
'light-protanopia-deuteranopia': '{base.color.blue.1}',
'dark-protanopia-deuteranopia': {
$value: '{base.color.blue.3}',
'dark-high-contrast': {
$value: '{base.color.green.3}',
alpha: 0.3,
},
},
Expand Down Expand Up @@ -121,6 +154,10 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'dark-high-contrast': {
$value: '{bgColor.danger.muted}',
alpha: 0.2,
},
'dark-protanopia-deuteranopia': {
$value: '{base.color.orange.4}',
alpha: 0.15,
Expand All @@ -139,6 +176,12 @@
group: 'component',
scopes: ['fgColor'],
},
'org.primer.overrides': {
'light-high-contrast': '{fgColor.onEmphasis}',
'dark-high-contrast': '{fgColor.onEmphasis}',
'dark-protanopia-deuteranopia': '{base.color.neutral.12}',
'dark-tritanopia': '{base.color.neutral.12}',
},
},
},
bgColor: {
Expand All @@ -151,6 +194,18 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.orange.1}',
'light-tritanopia': '{base.color.red.1}',
'light-high-contrast': '{base.color.red.5}',
'dark-protanopia-deuteranopia': {
$value: '{base.color.orange.4}',
alpha: 0.4,
},
'dark-high-contrast': '{bgColor.danger.emphasis}',
'dark-tritanopia': {
$value: '{base.color.red.4}',
alpha: 0.4,
},
dark: {
$value: '{base.color.red.4}',
alpha: 0.4,
Expand Down Expand Up @@ -186,6 +241,20 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.orange.1}',
'light-tritanopia': '{base.color.red.1}',
'dark-high-contrast': {
$value: '{bgColor.danger.muted}',
alpha: 0.3,
},
'dark-protanopia-deuteranopia': {
$value: '{base.color.orange.4}',
alpha: 0.3,
},
'dark-tritanopia': {
$value: '{base.color.red.4}',
alpha: 0.3,
},
dark: {
$value: '{base.color.red.4}',
alpha: 0.3,
Expand All @@ -200,29 +269,35 @@
},
},
hunkLine: {
bgColor: {
$value: '{bgColor.accent.muted}',
fgColor: {
$value: '{fgColor.muted}',
$type: 'color',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component',
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.neutral.1}',
'dark-protanopia-deuteranopia': '{base.color.neutral.3}',
scopes: ['fgColor'],
},
},
},
fgColor: {
$value: '{fgColor.muted}',
bgColor: {
$value: '{bgColor.accent.muted}',
$type: 'color',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component',
scopes: ['fgColor'],
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.neutral.1}',
'dark-protanopia-deuteranopia': '{base.color.neutral.3}',
'light-tritanopia': '{base.color.neutral.1}',
'dark-tritanopia': '{base.color.neutral.3}',
'dark-high-contrast': {
$value: '{bgColor.accent.muted}',
alpha: 0.2,
},
},
},
},
Expand Down Expand Up @@ -251,6 +326,7 @@
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{fgColor.default}',
'light-tritanopia': '{base.color.black}',
},
},
},
Expand All @@ -267,8 +343,15 @@
},
'org.primer.overrides': {
dark: '{base.color.blue.8}',
'light-protanopia-deuteranopia': '{base.color.neutral.3}',
'dark-tritanopia': '{base.color.neutral.6}',
'dark-high-contrast': {
$value: '{base.color.blue.4}',
alpha: 0.4,
},
'dark-protanopia-deuteranopia': '{base.color.neutral.6}',
'light-high-contrast': '{base.color.blue.1}',
'light-tritanopia': '{base.color.neutral.3}',
'light-protanopia-deuteranopia': '{base.color.neutral.3}',
},
},
},
Expand All @@ -282,8 +365,10 @@
scopes: ['bgColor'],
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': '{base.color.neutral.7}',
'dark-protanopia-deuteranopia': '{base.color.neutral.8}',
'light-protanopia-deuteranopia': '{base.color.neutral.7}',
'dark-tritanopia': '{base.color.neutral.8}',
'light-tritanopia': '{base.color.neutral.7}',
},
},
},
Expand Down Expand Up @@ -325,6 +410,10 @@
group: 'component',
scopes: ['fgColor'],
},
'org.primer.overrides': {
'light-high-contrast': '{fgColor.default}',
'dark-high-contrast': '{fgColor.default}',
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,66 +508,6 @@
},
},
},
diffBlob: {
additionLine: {
fgColor: {
$value: '{fgColor.onEmphasis}',
$type: 'color',
},
bgColor: {
$value: '{bgColor.success.muted}',
$type: 'color',
alpha: 0.2,
},
},
additionWord: {
bgColor: {
$value: '{bgColor.success.emphasis}',
$type: 'color',
alpha: 1,
},
},
deletionLine: {
fgColor: {
$value: '{fgColor.onEmphasis}',
$type: 'color',
},
bgColor: {
$value: '{bgColor.danger.muted}',
$type: 'color',
alpha: 0.2,
},
},
deletionWord: {
bgColor: {
$value: '{bgColor.danger.emphasis}',
$type: 'color',
alpha: 1,
},
},
hunkNum: {
bgColor: {
rest: {
$value: '{base.color.blue.4}',
$type: 'color',
alpha: 0.4,
},
},
},
hunkLine: {
bgColor: {
$value: '{bgColor.accent.muted}',
$type: 'color',
alpha: 0.2,
},
},
expander: {
iconColor: {
$value: '{fgColor.default}',
$type: 'color',
},
},
},
codeMirror: {
selection: {
bgColor: {
Expand Down
37 changes: 0 additions & 37 deletions src/tokens/functional/color/dark/overrides/dark.tritanopia.json5
Original file line number Diff line number Diff line change
Expand Up @@ -121,43 +121,6 @@
},
},
},
diffBlob: {
additionNum: {
bgColor: {
$value: '{base.color.blue.3}',
$type: 'color',
alpha: 0.3,
},
},
additionWord: {
bgColor: {
$value: '{base.color.blue.4}',
$type: 'color',
alpha: 0.4,
},
},
hunkNum: {
bgColor: {
rest: {
$value: '{base.color.neutral.6}',
$type: 'color',
alpha: 1,
},
hover: {
$value: '{base.color.neutral.8}',
$type: 'color',
alpha: 1,
},
},
},
hunkLine: {
bgColor: {
$value: '{base.color.neutral.3}',
$type: 'color',
alpha: 1,
},
},
},
codeMirror: {
syntax: {
fgColor: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,45 +440,6 @@
},
},
},
diffBlob: {
additionWord: {
fgColor: {
$value: '{fgColor.onEmphasis}',
$type: 'color',
},
bgColor: {
$value: '{base.color.green.5}',
$type: 'color',
alpha: 1,
},
},
deletionWord: {
fgColor: {
$value: '{fgColor.onEmphasis}',
$type: 'color',
},
bgColor: {
$value: '{base.color.red.5}',
$type: 'color',
alpha: 1,
},
},
hunkNum: {
bgColor: {
rest: {
$value: '{base.color.blue.1}',
$type: 'color',
alpha: 1,
},
},
},
expander: {
iconColor: {
$value: '{fgColor.default}',
$type: 'color',
},
},
},
header: {
borderColor: {
divider: {
Expand Down
Loading

0 comments on commit 02018d8

Please sign in to comment.