Closed sebald closed 2 years ago
@ti10le we should gather "semantic colors" (error, info, warning, ...) and other value we want to support in createTheme
. Do you want to make a list?
@ti10le we should gather "semantic colors" (error, info, warning, ...) and other value we want to support in
createTheme
. Do you want to make a list?
Yes I can! But what other values do you mean? Do you mean some values we already have (space, sizes) or more values like from open-props: gradient, animation or s.e.?
@ti10le fonts for example, not sure if there are any others. but the colors are the most important ones, i guess.
to extend createTheme()
:
colors: {
text: ...,
background: ...,
primary: ...,
secondary: ...,
disabled: ...,
error: ...,
warning: ...,
info: ...,
success: ...,
white: // ? like in docs theme,
black: // ? like in docs theme,
}
fonts: {
body: ...,
heading: ...,
}
for the future maybe something like this:
// brand colors
primaryLight: '$blue200', // $blue600 on dark mode
primary: '$blue500',
primaryDark: '$blue600',
primaryShadow: '$blue100', // $blue600 on dark mode
secondaryLight: '$purple200', // $purple600 on dark mode
secondary: '$purple500',
secondaryDark: '$purple600',
secondaryShadow: '$purple100', // $purple600 on dark mode
@ti10le white, black can not be a single value, see @marigold/tokens
. Needs hues. When is background
used?
Change Proposal: Use regular CSS as much as possible, because recomputing the styles programmatically is expensive and could make apps slow.
state
in component styles but rather use pseudos :hover
, :focus
, ...error
to invalid
maybe, since input:invalid
is a real selector and differentiate from :hover
-> &:hover, &.mg-hover
or &:hover, &[data-hover]
(since we do not want to write or own theme-ui, we have to do this inside the <Box>
before passing it to emotion)@ti10le white, black can not be a single value, see
@marigold/tokens
. Needs hues. When isbackground
used?
I think background could be useful inside components eg dialog. But sure we could also remove it.
Closing. Will do createTheme
updates past 1.0. See #2002
Description
We need to refactor our themes!
Requirements
:disabled
)Tasks
theme-ui
select stuff from the theme #1972Theme Spec
Context
Our themes became very large and hard to maintain, we need more structure!
Consequences
More to write, but maintainable 🥳