You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/src/pages/migrating.mdx
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,25 @@ title: Migrating
6
6
7
7
## v0.3
8
8
9
+
### What's New
10
+
11
+
- Components can now be imported directly from the `theme-ui` package. Be sure that treeshaking is enabled with your build tool.
12
+
- Includes smart defaults for adding base styles to the `<body>` element.
13
+
- Simplified color modes API.
14
+
- New `@theme-ui/css`, `@theme-ui/core`, `@theme-ui/color-modes`, and `@theme-ui/mdx` packages allow for more bespoke ways to use the library.
15
+
16
+
### Breaking Changes
17
+
18
+
-`@emotion/core` and `@mdx-js/react` are now dependencies of `theme-ui` and should not be installed separately. If you'd like to use a particular version of each library, use [Yarn resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/).
9
19
- Theme UI context no longer provides `context.components`. If you're using this object from context, use the MDX hook instead. E.g. `import { useMDXComponents } from '@mdx-js/react'`
10
-
- Color mode API:
11
-
- Default color mode name
12
-
- Manually enable `useColorSchemeMediaQuery`
13
-
- Removes layout components (`Layout`, `Header`, `Main`, `Footer`). Use the `Box` and `Flex` layout primitives instead.
14
-
- Theme context is now stateless. If you've made use of `context.setTheme`, this no longer works. An alternative approach will be introduced later.
15
-
- Global typographic styles
20
+
- If you'd like color mode to be initialized from the `prefers-color-scheme` media query, you must enable the `useColorSchemeMediaQuery: true` flag in your theme.
21
+
- The `ColorMode` component is deprecated and no longer required to add color styles to the `<body>` element.
22
+
- The following components have been removed in favor of using `Box` and `Flex` components: `Layout`, `Header`, `Main`, `Footer`
23
+
- The `initialColorMode` flag no longer works, use `initialColorModeName` instead.
24
+
- The `ThemeProvider` now adds global typographic styles to the `<body>` element based on `theme.styles.root`. To disable this behavior set the `useBodyStyles: false` flag in your theme.
25
+
- Theme context is now stateless. If you've made use of `context.setTheme`, this no longer works. An alternative approach is available with the `@theme-ui/editor` package.
26
+
- The `ThemeStateProvider` component is no longer avialable, see `@theme-ui/editor` as an alternative.
27
+
- The `@theme-ui/editor` package has a completely new API. Please refer to the package's [README.md](https://github.com/system-ui/theme-ui/blob/master/packages/editor/README.md) for more information.
0 commit comments