|
5 | 5 |
|
6 | 6 | ## Theming
|
7 | 7 |
|
8 |
| -Talk about use of dark and light themes, including default color selections. |
| 8 | +Strum's colors and components adapt beautifully to either a light or dark color scheme. Using the <Link href="/components/StrumProvider">StrumProvider</Link> you can either force a light/dark color scheme, or allow the user's system preferences to determine the color scheme. Atomic classes within the design system will then choose the appropriate backgrounds, borders, text colors, and accents to work with the light or dark mode. |
| 9 | + |
| 10 | +Although we have lots of color options you can choose from, we cannot currently take a custom accent color or theme overrides. We'll be working on this possibility in the future. |
9 | 11 |
|
10 | 12 | ## Design tokens
|
11 | 13 |
|
12 |
| -I'll use this space to talk about atomic properties that you can use. Talk about general design and layout strategies, etc. |
| 14 | +Design tokens are used to generate atomic classes that you can access for your custom layouts and components. You can always access these values with the <Link href="/components/Box">Box primitive</Link>. |
13 | 15 |
|
14 | 16 | ### Colors
|
15 | 17 |
|
16 |
| -### Spacing |
| 18 | +Strum uses two separate color palettes, and you can choose one color from each palette to design your application. The [neutral colors](https://www.radix-ui.com/docs/colors/palette-composition/the-scales#grays) are shades of gray that designate the background colors and hover/focus states of various components. You can choose a completely neutral `gray` or subtle color variants like `slate` or `mauve`. |
| 19 | + |
| 20 | +You also choose an [accent color](https://www.radix-ui.com/docs/colors/palette-composition/the-scales#colors) to fit with your site's branding. |
| 21 | + |
| 22 | +Once you've selected these base color palettes, you'll have access to the following color tokens. |
17 | 23 |
|
18 |
| -### Layouts |
| 24 | +- Accent colors |
| 25 | + - `accent1` to `accent12` |
| 26 | + - `accentContrast`, either black or white depending on which accent color you've chosen |
| 27 | + - `accentTransparent`, a slightly transparent version of your accent color |
| 28 | +- Neutral colors |
| 29 | + - `neutral1` to `neutral12` |
| 30 | + - `neutralTransparent`, a slightly transparent version of your neutral color |
| 31 | +- Context colors |
| 32 | + - `error1` to `error12` |
| 33 | + - `errorContrast`, pure white to contrast the error background color |
| 34 | + - `errorTransparent`, a slightly transparent version of the error color |
| 35 | + - `successContrast`, pure white to contrast the success background color |
| 36 | + - `successTransparent`, a slightly transparent version of the success color |
| 37 | + - `warningContrast`, pure black to contrast the warning background color |
| 38 | + - `warningTransparent`, a slightly transparent version of the warning color |
| 39 | +- CSS values |
| 40 | + - `current`, the CSS `currentColor` value |
| 41 | + - `inherit`, the CSS `inherit` value |
| 42 | + - `transparent`, the CSS `transparent` value |
| 43 | +- Plain colors |
| 44 | + - `black`, pure black |
| 45 | + - `white`, pure white |
| 46 | + |
| 47 | +### Sizing |
| 48 | + |
| 49 | +- Spacers |
| 50 | + - `0` |
| 51 | + - `1`, `0.25rem` (4px) |
| 52 | + - `2`, `0.5rem` (8px) |
| 53 | + - `3`, `0.75rem` (12px) |
| 54 | + - `4`, `1rem` (16px) |
| 55 | + - `5`, `1.5rem` (24px) |
| 56 | + - `6`, `2rem` (32px) |
| 57 | + - `7`, `2.5rem` (40px) |
| 58 | + - `8`, `3rem` (48px) |
| 59 | + - `9`, `4rem` (64px) |
| 60 | + - `10`, `5rem` (80px) |
| 61 | + - `11`, `6rem` (96px) |
| 62 | + - `12`, `8rem` (128px) |
| 63 | +- CSS values |
| 64 | + - `auto`, CSS `auto` value |
| 65 | + - `full`, CSS `100%` value |
| 66 | + - `fitContent`, CSS `fit-content` value |
| 67 | + - `maxContent`, CSS `max-content` value |
| 68 | + - `maxContent`, CSS `min-content` value |
| 69 | + - `100vh`, CSS `100vh` value |
| 70 | + - `100vw`, CSS `100vw` value |
| 71 | + - `gapX`, `2rem`, equal to the horizontal gap/padding sizes used across the app, such as containers |
| 72 | + - `gapY`, `2rem` |
19 | 73 |
|
20 | 74 | ## Accessibility
|
21 | 75 |
|
22 |
| -Talk about component and color accessibility. |
| 76 | +Strum is highly focused on making sure that interactive and non-interactive elements are built with accessibility in mind. We often require certain props that are necessary for the component to take advantage of these accessibility features, and we sometimes choose to compromise slightly on a visual choice in favor of accessibility. For example, we've modified the Radix colors at step `9` for better color contrast. |
| 77 | + |
| 78 | +These features will always take priority, so please open an issue or a pull request on our [GitHub repo](https://github.com/colinhemphill/strum) if something doesn't meet an accessibility standard that we should be meeting. |
0 commit comments