@theme-ui/theme-provider- fix(theme-provider): set body margin to 0 (@hasparus)
@theme-ui/theme-provider- Merge branch 'develop' into stable (@hasparus)
- Piotr Monwid-Olechnowicz (@hasparus)
@theme-ui/color-modes- fix(color-modes): stop showing current color mode as initial mode in rawColors.modes (@hasparus)
@theme-ui/color-modes,@theme-ui/color,@theme-ui/components,@theme-ui/core,@theme-ui/css,@theme-ui/custom-properties,@theme-ui/editor,gatsby-plugin-theme-ui,gatsby-theme-code-recipes,gatsby-theme-style-guide,gatsby-theme-ui-layout,@theme-ui/match-media,@theme-ui/mdx,@theme-ui/parse-props,@theme-ui/preset-base,@theme-ui/preset-bootstrap,@theme-ui/preset-bulma,@theme-ui/preset-dark,@theme-ui/preset-deep,@theme-ui/preset-funk,@theme-ui/preset-future,@theme-ui/preset-polaris,@theme-ui/preset-roboto,@theme-ui/preset-sketchy,@theme-ui/preset-swiss,@theme-ui/preset-system,@theme-ui/preset-tailwind,@theme-ui/preset-tosh,@theme-ui/presets,@theme-ui/prism,@theme-ui/sidenav,@theme-ui/style-guide,@theme-ui/tachyons,@theme-ui/tailwind,@theme-ui/theme-provider,theme-ui,@theme-ui/typography- Merge branch 'stable' into develop (@hasparus)
- Piotr Monwid-Olechnowicz (@hasparus)
@theme-ui/color-modes@theme-ui/color-modes,@theme-ui/css,@theme-ui/custom-properties,theme-ui- fix(color-modes): merge rawColors from nested theme providers (@hasparus)
- Reverted
cache-providerPR as it significantly complicates SSR setup and breaks apps without explicit Emotion SSR config. system-ui#1717 (comment).
- @Zolwiastyl
- Piotr Monwid-Olechnowicz (@hasparus)
-
BREAKING:
theme.config.useRootStylesnow defaults totruefollowing deprecation ofuseBodyStyles. Styles fromtheme.styles.rootare now added to<html>element by default. -
Moved theme configuration options to
configobject in theme.- Deprecations:
useRootStyles,useCustomProperties,useColorSchemeMediaQuery,useBorderBox, anduseLocalStorageoptions on the theme object are now scoped under aconfigobject on the theme, and the root-level options, now deprecated, will be removed in a future release.
(e.g. you should be setting
theme.config.useBorderBoxinstead oftheme.useBorderBox)- ⚠ All config options should be migrated at once. If Theme UI sees
theme.configexists, it won't look for options on thetheme.
- Deprecations:
-
Removed APIs, previously deprecated in 0.6.0
theme.useBodyStyles⟶theme.config.useRootStylesStyled⟶Themed
@theme-ui/color-modes,@theme-ui/css,gatsby-plugin-theme-ui
- (REVERTED in v0.8.1)
@theme-ui/core,@theme-ui/sidenav- Wrap top level ThemeProvider in CacheProvider #1717 (@hasparus @Zolwiastyl)
- Improve Switch component documentation #1687 (@flo-sch)
- Describe Preconstruct in Contributing.md #1715 (@hasparus)
🎉 v0.8.0 contains work from a new contributor! 🎉
Thank you, @Zolwiastyl, for all your work!
- @Zolwiastyl
- Florent SCHILDKNECHT (@flo-sch)
- Francis Champagne (@fcisio)
- Lachlan Campbell (@lachlanjc)
- Piotr Monwid-Olechnowicz (@hasparus)
@theme-ui/css- Add 6 border logical color properties to scales #1668 (@lachlanjc)
- docs: useColorSchemeMediaQuery defaults to true (@hasparus)
- Lachlan Campbell (@lachlanjc)
- Piotr Monwid-Olechnowicz (@hasparus)
- Add new links to Resources page #1670 (@lachlanjc)
- Add link to JSX Pragma page on Getting Started doc (@lachlanjc)
@theme-ui/css- Add 2 missing CSS column properties to scales #1669 (@lachlanjc)
- Add text-decoration-color to scales #1667 (@lachlanjc)
- Lachlan Campbell (@lachlanjc)
🎉 This release contains work from a new contributor! 🎉
❤️ David Dios (@dios-david)
Thanks for all your work!
@theme-ui/css- Adding
scroll-marginprops #1664 (@dios-david)
- Adding
@theme-ui/editor- chore(deps): bump reakit from 1.3.5 to 1.3.7 #1644 (@dependabot-preview[bot] @lachlanjc)
- David Dios (@dios-david)
- Kenny (@kenny-f)
- Lachlan Campbell (@lachlanjc)
🎉 This release contains work from a new contributor! 🎉
Thank you, Jonathan Van Buren (@vanbujm), for all your work!
gatsby-plugin-theme-ui@theme-ui/components
- chore(deps): bump ssri from 6.0.1 to 6.0.2 in /examples/next #1661 (@dependabot[bot])
- chore(deps): [security] bump ssri from 6.0.1 to 6.0.2 #1660 (@dependabot-preview[bot])
- Have
breakpointsaccept custom media queries #1653 @carolinmaisenbacher
gatsby-plugin-theme-ui,gatsby-theme-code-recipes,gatsby-theme-style-guide,gatsby-theme-ui-layout
- all packages -Build packages with Preconstruct 2 #1423 (@alexanderchan @hasparus)
-
Reexported
jsxascreateElementto fix babel JSX pragma crash. Issue #1603, PR #1604 by @ethanwu10.The following code doesn't crash anymore.
<div {...{}} key="1" />
changes relative to 0.3, not the latest 0.6 prerelease
-
Styledcomponents dict was renamed toThemedto avoid confusion withstyledcomponents constructors from@emotion/styledand similar libraries. -
theme.useRootStylesconfiguration option (false by default). Set it totrueto addstyles.roottohtmlinstead ofbody.theme.useBodyStylesconfiguration option still defaults totrue, but it's going in to be deprecated in favor oftheme.useRootStylesin the future.
-
New scale:
transitionssupportingtransitionCSS property. Issue #1079, PR #1272 -
Objects in nested scales can now have a
__defaultkey. PR #951Given the theme
const theme = { colors: { primary: { __default: '#00f', light: '#33f', } } }color: 'primary'resolves tocolor: '#00f'. -
Configuration option for printing color mode. PR #1267, issue #1144. No more wasted ink.
{ initialColorModeName: "dark", printColorModeName: "light" } -
A new component, Paragraph was added in PR #1298
-
Theme UI 0.6 depends on Emotion 11, and isn't compatible with Emotion 10 anymore.
- If you didn't install Emotion separately, this update shouldn't affect you.
- If your other dependencies depend on Emotion 10, and have no published versions for Emotion 11, you can use Yarn resolutions or Webpack's resolve.alias to enforce a version.
Refer to Emotion 11 release notes for more information.
-
Color mode flash on first render is gone, but to achieve this we had to bring back
theme.rawColors.- You can no longer read raw color values from
theme.colorswhen reading theme fromuseThemeUIor insidesx. .colorsobject contains Custom CSS Properties now.- If you need to pass original value somewhere where CSS Properties (e.g.
WebGL Canvas) won't work use
.rawColors.
- You can no longer read raw color values from
-
Default color mode name is no longer
"default"— it's nowundefined, what represents the lack of color mode set by user or detected from preferences. -
useColorSchemeMediaQuerydefaults totrue. Issue #624, PR #1373How to migrate? Add
useColorSchemeMediaQuery: falseto your theme if you don't have this property. Read more in the docs. -
We no longer export internal React context named as
Context😅 It wasn't and it's still not public API, but if you used it and you really need it, you can grab it as__ThemeUIContext. (But please don't do this. UseThemeProviderfrom @theme-ui/core for local theme overrides instead.)
Styledwill be removed in v0.7. UseThemedinstead.useBodyStyleswill be removed in v0.7. UseuseRootStylesinstead.
Theme UI is now written in TypeScript, and the emitted types differ from
@types/theme-ui.
-
falsein now accepted in responsive tuple types. PR #1499 -
Known colors (primary, text, background, accent, secondary) in
ColorModecan now be nested scales.The following no longer typechecks, as
colors.primarycan be an object.sx={{ color: theme => theme.colors?.primary?.toUpperCase() }}
But the following code still works.
sx={{ color: theme => theme.colors?.primary }}
If
colors.primaryis an object,colors.primary.__defaultis used. -
falsevalues are skipped before passing style objects to Emotion. Issue #1297, PR #1460.The following syntax is now supported
sx={{ color: isActive && blue }}
-
"as" prop on Themed.X components now properly opts out of typechecking
- TypeScript users, don't use
ComponentProps<typeof Themed['div']>, importThemedComponentand useThemedComponent<'div'>instead.
- TypeScript users, don't use
-
Theme UI 0.6 depends on
csstypev3 instead ofcsstypev2. -
Renamed types
- Anything copied from
styled-systemtypes was renamed or removed. SxPropswas renamed toSxProp.SxStyleProp, an alias forThemeUIStyleObjectwas removed. UseThemeUIStyleObjectinstead.
- Anything copied from
Refer to the changelog for a full list of changes.
-
Make the rename of
StyledtoThemednon-breaking. Add a deprecation warning onStyleduntil a future release. PR #1461 -
Paragraph component's hardcoded responsive style has been removed (issue #1476)
-
Fix issue where css custom vars are only added to body if modes is in the colors declaration of the theme.
-
BREAKING: Move theme configuration options to
configobject in theme.
-
Breaking TypeScript: Known colors (primary, text, background, accent, secondary) in
ColorModecan now be nested scales.The following no longer typechecks, as
colors.primarycan be an object.sx={{ color: theme => theme.colors?.primary?.toUpperCase() }}
But the following code still works.
sx={{ color: theme => theme.colors?.primary }}
If
colors.primaryis an object,colors.primary.__defaultis used. -
Add
theme.useRootStylesconfiguration option (false by default). Set it totrueto addstyles.roottohtmlinstead ofbody.theme.useBodyStylesconfiguration option still defaults totrue, but it's going in to be deprecated in favor oftheme.useRootStylesin the future. -
Accept `false` in responsive tuple types. PR #1499
-
Skip
falsevalues before passing style objects to Emotion. Issue #1297, PR #1460.
-
BREAKING: Default
useColorSchemeMediaQuerytotrue. Issue #624, PR #1373How to migrate? Add
useColorSchemeMediaQuery: falseto your theme if you don't have this property. Read more in the docs. -
Option for
gatsby-plugin-theme-uito disable body script (injectColorFlashScript, defaulting totrue). Issue #1369, PR #1370 -
Bump versions
@mdx-js/mdxand@mdx-js/reactto^1.6.22, gatsby-plugin-mdx to^1.6.0. PR #1351 -
Fix: "as" prop on Themed.X components now properly opts out of typechecking
- TypeScript users, don't use
ComponentProps<typeof Themed['div']>, importThemedComponent<'div'>instead.
- TypeScript users, don't use
-
@theme-ui/prism: Support multiple highlight wrappers in a single code block. PR #1393
-
Support a default key for object in scales. PR #951
Given the theme
const theme = { colors: { primary: { __default: '#00f', light: '#33f', } } }color: 'primary'resolves tocolor: '#00f'.
- Extract objects with nested variant props. Issue #1357
- Add ability for MDX styling, and fix mdx table align styles. Issue #654
- Remove recursive default values from CSS custom properties. PR #1327
- Render extra Embed props onto
iframetag instead of wrappingdiv. Issue #966, PR #1122
- Remove recursive default values from CSS custom properties. PR #1327
- Switches from lodash.kebabCase to alternative package (param-case) per official Lodash documentation. PR #1304
- Rebuilds Prism preset with latest upstream theme changes. PR #1304
- Fix: Preserve order of variant expansion props. PR #1326 (bug introduced in 0.5.0-alpha.1)
- BREAKING: Rename
Styledcomponent toThemed. PR #1323 - BREAKING: Make Text component use
spaninstead ofdiv - breaking TypeScript: Renamed and removed types. PR #1308
SxPropstoSxProp.SxStyleProp, an alias forThemeUIStyleObjectremoved. UseThemeUIStyleObjectinstead.
- Fix: Add
sxprops types to all props acceptingclassName. PR #1308 - Fix WithPoorAsProp to work with ComponentProps utility type. PR #1308
- Don't pass
false,undefinedandnullto Emotion. Allow them as style values in TypeScript. PR #1090 - Allow to inject user's exact theme type. PR #1090
- Add
theme.options.strictModeobject with configuration for Theme UI strict mode. - TODO short excerpt from the docs on how to use it
- Add
- Add Paragraph component. PR #1298
- Bump React peerDependency to
"^16.14.0 || ^17.0.0". - Support automatic JSX runtime. Issue #1160, PR #1237
- Bump React peerDependency to
"^16.14.0 || ^17.0.0". - Apply variant styles before responsive styles. Issues #1030, and #720, PR #1273
- BREAKING: Upgrade to Emotion 11, and
csstype3. PR #1261- We are now depending on
@emotion/react@11instead of@emotion/core@10 sxprop types are still global, and we opt in for Emotioncssprop types (This will change in the future.)- Refer to Emotion 11 release notes for more information.
- We are now depending on
- Fix color CSS Custom Properties recursive reference
- Add transitions scale. Issue #1079, PR #1272
- Use correct version of @theme-ui/components in theme-ui package. (Locked dependencies on other Theme UI packages)
- Add documentation on CSS keyframes #1269
-
Add configuration option for printing color mode. PR #1267, issue #1144.
{ initialColorModeName: "dark", printColorModeName: "light" }
- Add
arrowprop to Select to allow passing custom arrow icon. Issues #1177 #1151, PR #1232 - Fix: Field component uses
idif passed. PR #1252 - Fix circular import in Switch.js
- Fix Button not respecting hidden prop. Issue #1254
- Add
minWidth: min-contenton Checkbox and Radio. PR #1256
- Fix support for rgb/hsl color values
-
Add Switch component #1035
<Label> <Switch /> Enable email alerts? </Label>
-
Pass
sizeprop down to IconButton in Close component. PR #1242<Close size={24} />
- Convert Gatsby example to TypeScript and stop using removed components. Issue #1227, PR #1229
- Make ThemeProvider
themeprop required
- Removes overriding property on editor combobox #687
- Add
@theme-ui/preset-sketchy
- Add support for highlighting lines #895
@theme-ui/sidenav: move React to peerDependencies #978
- Pass
sizeprop to ColorRow component #941
- Accept SetStateAction and generic parameter #1174
- Fix broken base-preset link on
themingpage
- Fix peer dependencies. Issue #725, PR #836
- Add theme colors support to columnRuleColor and caretColor #1085
- Support scrollPadding variations in sx props. Issue #1214
- Support Webpack 5. (Uses default export from package.json instead of named export) #1141
- Add
primaryas default variant forBadgecomponent #1109 - Add
primaryas default variant forAlertcomponent #1102 - Add
theme.text.defaultvariant forTextcomponent #870
- Fix example logo on Avatar & Image component docs #1233
- Fix theme editor output in docs #1182
- Adjusts media query sort logic #600
- Fixes link to Gatsby Plugin page in
getting-startedpage. Issue #602, PR #603
- Split theme-ui package into
@theme-ui/core,@theme-ui/mdx, and@theme-ui/color-modes - Removes
context.components(still available through MDX context) - Adds separate
ColorModeProvidercomponent - Removes support for
theme.initialColorMode- useinitialColorModeNameinstead - Removes layout components (
Layout,Header,Main,Footer) - useBoxandFlexinstead - Updates CSS custom properties implementation for color modes
- When using
useColorSchemeMediaQueryflag, it will initialize the mode tolightwhen@media (prefers-color-scheme: light)is enabled - Global color mode styles are automatically added to the body without needing
to render the
ColorModecomponent - Adds global typographic styles, set
useBodyStyles: falseto disable - Removes
ThemeStateProvider - Fix issue where
<del>tag was incorrectly specified asdelete - The
@theme-ui/editorAPI has changed significantly. See the README.md for more information. @theme-ui/components: on Grid component, allow customcolumnsdefinitions via strings #541@theme-ui/gatsby-theme-style-guide: add docs on shadowing #558- Adds
@theme-ui/preset-polaris#567 - Adjusts default font stack in presets #568
@theme-ui/color: addtransparentizefunction #370@theme-ui/style-guide: move context dependencies to peer dependencies #521
- Fix for issues when
localStorageis not available #514 @theme-ui/match-media: add option for default index in hook #460@theme-ui/editor: Update Reakit #517
@theme-ui/editor: fix color picker #498
@theme-ui/components: fix NavLink base styles #497
@theme-ui/components: add more components #458@theme-ui/color: addalphautility #441@theme-ui/match-media: Add default breakpoint index argument for SSR
@theme-ui/editoradd components for editingsxstyles
@theme-ui/editoraddStylesFormcomponent
- Fix environment check #415
- Update dependencies
- Add
@theme-ui/match-mediapackage #375 - Add
@theme-ui/componentspackage #411
- Fix prop forwarding in styled HOC #377
- Add missing key #406
- Add support for functional themes #400
- Fix Reakit for ColorPicker test #357
- Simplify color mode API and disable
prefers-color-schememedia query behavior by default #246 - Add BaseStyles component #369
- Updated UI in chrome extension
- Fix typo in tailwind preset #346
- Fix state bug in chrome extension
- Move React to peer dependencies
- Updated
@theme-ui/editorpackage - New Customize page
- Pass outer context through RootProvider #340
- Update dependencies
- Added new
ColorPickercomponent to@theme-ui/editor#327 - Added warning for conflicting versions of Emotion #297
- Added color utility package #331
- Update dependencies
- Added
gatsby-theme-ui-blogpackage #311 - Added
gatsby-theme-code-recipepackage #313 - Updated styles in
gatsby-theme-style-guide#315
- Adds
gatsby-theme-style-guidepackage #301 - Fix for
jsxcreate element function #302
gatsby-plugin-theme-uiremove JSX syntax from gatsby-ssr in Gatsby plugin #299@theme-ui/typographyfix for CSS font-family keywords #285@theme-ui/preset-tailwindadd button and input variants #291
- Add support for FOUC fix in Next.js #277
- Update dependencies
- Add accordion sidenav #279
- Maintain raw color values in Theme UI context when
useCustomPropertiesis enabled #274
- Updates for tailwind preset #272
- Update dependencies
- Add tosh preset #264
- Bad lerna publish
- Fix for CSS custom properties when using nested color objects #259
- Add warning when
initialColorModematches a color mode name #245 - Fix for forwarding refs #261
- Fix peer dependency version #263
- Add
@theme-ui/custom-propertiespackage #235
- Adds preset packages #210
- Add base colors to prism presets #249
- Add key to element in gatsby-plugin-theme-ui #248
- Add metadata to packages #244
- Update docs
- Update dependencies
- Add presets to
@theme-ui/prism#231 - Fix array merging #230
- Fix for color mode in context #226
- Fix for unsupported Prism languages #218
- Update dependencies
- Update docs
- Update dependencies
- Forward all props to functional components #197
- Update dependencies
- Only pass
cssprop through when needed injsx#182
- Fix bad publish
- Adds Chrome extension package #136
- Fix keys in tailwind preset #171
- Add optional support for CSS custom properties #166
@theme-ui/sidenavinitial publish@theme-ui/prismadddisplay: inline-blockto keep empty lines
@theme-ui/prismpass outer className to element #163
- Adjust color mode initialization from media query #157
- Fix publish
- Adjust microbundle setup for @theme-ui/prism
- Add @theme-ui/prism package
- Add
keyprop to element in gatsby-plugin-theme-ui #145 - Update docs
- Rename
gatsby-plugin-theme-ui#137 - Update docs
- Replaced
lodash.mergewithdeepmerge - Updated to use smaller Styled System v5 packages
- Removed layout and flexbox style props from
Boxand layout components - Renamed
cssprop in experimental custom pragma tosxto avoid collisions with Emotion and other libraries - Refactored
ThemeProvider - Removed
toStyleAPI from Typography.js package - Renamed Typography.js package to
@theme-ui/typography - Removed
@emotion/styleddependency - layout components are no longer created withstyledso passing non-HTML attributes to the component will result in React rendering those props to the DOM - Removed legacy
ColorModeProviderandComponentProviderexports