Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design system color theming updates #13821

Merged
merged 35 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f12c471
deprecate: inverted token
wackerow Sep 6, 2024
9313c22
theme: update gray palette with lum margin
wackerow Sep 6, 2024
4f7b6e6
fix: contrast with lang picker menu selected bg
wackerow Sep 6, 2024
9255c63
fix: progress bar component and colors for quizzes
wackerow Sep 7, 2024
128a41d
chore: update button-hover color to DS
wackerow Sep 7, 2024
038eaad
feat: update all button variants to match DS
wackerow Sep 7, 2024
71d7b3c
fix: button variants to use latest updates
wackerow Sep 7, 2024
bbcf48c
feat: sync Chakra-UI button variant styles to DS
wackerow Sep 7, 2024
02d9a3f
patch: primary.hover _dark value
wackerow Sep 7, 2024
49d0a37
Merge branch 'colors-1' into colors-1-button-upgrade
wackerow Sep 7, 2024
5cdb1c0
fix: dark chakra background color
wackerow Sep 8, 2024
46cc6fb
feat: migrate nav element, add border-b
wackerow Sep 8, 2024
0e92088
fix: rm focus styling
wackerow Sep 8, 2024
5d551cb
fix: nav button styling consistency
wackerow Sep 8, 2024
1da596b
chore: use "warning" naming per design system
wackerow Sep 8, 2024
93a2e4e
theme: update color palettes to new theming
wackerow Sep 8, 2024
4e757d9
theme: update semantic tokens
wackerow Sep 8, 2024
0aa9f79
theme: update tailwind config with latest tokens
wackerow Sep 8, 2024
dea38fc
refactor: update use of deprecated tokens
wackerow Sep 8, 2024
c9e1ca6
chore: remove deprecated css variables from global
wackerow Sep 8, 2024
0a32fb6
refactor: EthPriceCard to tailwind
wackerow Sep 8, 2024
069f28c
theme: deprecate priceCard tokens from src/theme
wackerow Sep 8, 2024
8408561
fix: apply isSecondary to BentoCard button
wackerow Sep 9, 2024
cf38141
fix: button-hover shadow color
wackerow Sep 9, 2024
488f32e
deprecate: unused shadow tokens
wackerow Sep 9, 2024
6f724bd
chore: persist gradient for bg in dark mode
wackerow Sep 9, 2024
b335475
Merge pull request #13822 from ethereum/colors-1-button-upgrade
pettinarip Sep 10, 2024
5de36e8
Merge pull request #13825 from ethereum/colors-1-nav
pettinarip Sep 10, 2024
fe91618
Merge branch 'dev' into colors-1
pettinarip Sep 10, 2024
510d1a1
Merge pull request #13828 from ethereum/c1-pricecard
pettinarip Sep 10, 2024
9fe7aaa
fix: close button styling on DismissableBanner
wackerow Sep 10, 2024
508be8f
Merge branch 'dev' into colors-1
wackerow Sep 10, 2024
5636fb6
Merge branch 'dev' into colors-1
wackerow Sep 10, 2024
08b816b
rm: unused and unavaiable styling
wackerow Sep 10, 2024
594cddc
fix: declare group; align component name
wackerow Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/@chakra-ui/semanticTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const semanticTokens = {
base: { _light: "purple.600", _dark: "purple.400" },
highContrast: { _light: "purple.800", _dark: "purple.200" },
lowContrast: { _light: "purple.100", _dark: "purple.900" },
hover: { _light: "purple.500", _dark: "purple.500" },
hover: { _light: "purple.500", _dark: "purple.300" },
visited: { _light: "purple.700", _dark: "purple.300" },
action: { _light: "purple.600", _dark: "purple.600" },
actionHover: { _light: "purple.500", _dark: "purple.500" },
Expand All @@ -55,11 +55,9 @@ const semanticTokens = {
base: { _light: "gray.800", _dark: "gray.100" },
medium: { _light: "gray.500", _dark: "gray.400" },
light: { _light: "gray.200", _dark: "gray.600" },
// ! Deprecating body.inverted
inverted: { _light: "gray.100", _dark: "gray.800" },
},
background: {
base: { _light: "white", _dark: "gray.950" },
base: { _light: "white", _dark: "black" },
highlight: { _light: "gray.100", _dark: "gray.900" },
},
disabled: { _light: "gray.400", _dark: "gray.500" },
Expand Down
2 changes: 1 addition & 1 deletion src/@chakra-ui/stories/Colors.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const SemanticScheme: StoryObj = {
] as const
const deprecatedTokens: Record<(typeof tokenNames)[number], string[]> = {
primary: ["light", "dark", "pressed"],
body: ["inverted"],
body: [],
background: [],
disabled: [],
success: ["neutral", "outline"],
Expand Down
3 changes: 2 additions & 1 deletion src/components/Quiz/QuizzesStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Highlight,
HStack,
ListItem,
Progress,
SimpleGrid,
Stack,
Text,
Expand All @@ -24,6 +23,7 @@ import { ethereumBasicsQuizzes, usingEthereumQuizzes } from "../../data/quizzes"
import { Button } from "../Buttons"
import { TrophyIcon } from "../icons/quiz"
import Translation from "../Translation"
import { Progress } from "../ui/progress"

import {
getFormattedStats,
Expand Down Expand Up @@ -131,6 +131,7 @@ const QuizzesStats = ({

<Progress
value={(totalCorrectAnswers / totalQuizzesPoints) * 100}
className="h-2.5 bg-primary-low-contrast [&>div]:bg-primary"
/>

<Flex columnGap="10" direction={{ base: "column", lg: "row" }}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const CommandItem = React.forwardRef<
<CommandPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-primary-low-contrast aria-selected:text-body data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-body-inverse aria-selected:text-body data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
className
)}
{...props}
Expand Down
27 changes: 13 additions & 14 deletions src/styles/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

@layer base {
:root {
--white: 0, 0%, 100%; /* #ffffff */
--gray-50: 0, 0%, 97%; /* #f7f7f7 */
--gray-100: 0, 0%, 93%; /* #eeeeee */
--gray-150: 0, 0%, 93%; /* #ececec */ /* TODO: Confirm this shade, used in nav menu */
--gray-200: 0, 0%, 81%; /*#cecece */
--gray-300: 0, 0%, 67%; /* #acacac */
--gray-400: 0, 0%, 55%; /* #8C8C8C */
--gray-500: 0, 0%, 38%; /* #616161 */
--gray-600: 0, 0%, 20%; /* #333333 */
--gray-700: 0, 0%, 13%; /* #222222 */
--gray-800: 0, 0%, 11%; /* #1b1b1b */
--gray-900: 0, 0%, 7%; /* #121212 */
--gray-950: 0, 0%, 4%; /* #0a0a0a */
--white: 0, 0%, 100%; /* #FFFFFF */
--gray-50: 0, 0%, 97%; /* #F7F7F7 +1 */
--gray-100: 0, 0%, 93%; /* #EDEDED ±1 */ /* TODO: Confirm */
--gray-150: 0, 0%, 87%; /* #DEDEDE ±1 */ /* TODO: Confirm */
--gray-200: 0, 0%, 81%; /* #CECECE +1 */
--gray-300: 0, 0%, 67%; /* #ABABAB ±1 */
--gray-400: 0, 0%, 55%; /* #8C8C8C ±1 */
--gray-500: 0, 0%, 38%; /* #616161 ±1 */
--gray-600: 0, 0%, 20%; /* #333333 ±1 */
--gray-700: 0, 0%, 13%; /* #222222 -2 */
--gray-800: 0, 0%, 11%; /* #1B1B1B +2 */
--gray-900: 0, 0%, 7%; /* #121212 ±1 */
--gray-950: 0, 0%, 4%; /* #0A0A0A ±1 */
--black: 0, 0%, 0%; /* #000000 */

--purple-50: 262, 100%, 96%; /* #F3ECFF */
Expand Down Expand Up @@ -82,6 +82,5 @@
--green-900: 140, 37%, 6%; /* #0a160e */
--yellow-200: 47, 100%, 94%; /* #fff8df */
--yellow-500: 42, 100%, 37%; /* #bd8400 */

}
}
1 change: 1 addition & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const config = {
DEFAULT: "hsla(var(--body))",
medium: "hsla(var(--body-medium))",
light: "hsla(var(--body-light))",
inverse: "hsla(var(--body-inverse))",
},
background: {
DEFAULT: "hsla(var(--background))",
Expand Down
Loading