|
280 | 280 | --border_tertiary_hover: var(--opacity_black_1_8); |
281 | 281 | --border_tertiary_inactive: var(--opacity_black_1_8); |
282 | 282 | --border_tertiary_press: var(--opacity_black_1_15); |
| 283 | + /* The diff stats are 12px text, and a code colour has to clear WCAG AA |
| 284 | + * (4.5:1) against the surface it is drawn on. The status colours do not: |
| 285 | + * the light theme's green measures 2.7:1 on the grouped surface. */ |
| 286 | + --code-theme-addition-foreground: var(--green_700); |
| 287 | + --code-theme-deletion-foreground: var(--red_600); |
283 | 288 | --icon_default_accent: var(--blue_400); |
284 | 289 | --icon_default_inverted: var(--gray_0); |
285 | 290 | --icon_default_inverted_static: var(--opacity_white_0_95); |
|
495 | 500 | --border_tertiary_hover: var(--opacity_black_1_8); |
496 | 501 | --border_tertiary_inactive: var(--opacity_black_1_8); |
497 | 502 | --border_tertiary_press: var(--opacity_black_1_15); |
| 503 | + /* The diff stats are 12px text, and a code colour has to clear WCAG AA |
| 504 | + * (4.5:1) against the surface it is drawn on. The status colours do not: |
| 505 | + * the light theme's green measures 2.7:1 on the grouped surface. */ |
| 506 | + --code-theme-addition-foreground: var(--green_700); |
| 507 | + --code-theme-deletion-foreground: var(--red_600); |
498 | 508 | --icon_default_accent: var(--blue_400); |
499 | 509 | --icon_default_inverted: var(--gray_0); |
500 | 510 | --icon_default_inverted_static: var(--opacity_white_0_95); |
|
713 | 723 | --border_tertiary_hover: var(--opacity_white_0_15); |
714 | 724 | --border_tertiary_inactive: var(--opacity_white_0_15); |
715 | 725 | --border_tertiary_press: var(--opacity_white_0_8); |
| 726 | + /* The dark theme draws the diff stats on a darker surface, so the code |
| 727 | + * colours are the lighter steps: they measure 6.3:1 and 5.9:1 there. */ |
| 728 | + --code-theme-addition-foreground: var(--green_400); |
| 729 | + --code-theme-deletion-foreground: var(--red_300); |
716 | 730 | --icon_default_accent: var(--blue_500); |
717 | 731 | --icon_default_inverted: var(--gray_1000); |
718 | 732 | --icon_default_inverted_static: var(--opacity_white_0_95); |
|
0 commit comments