Socket
Socket
Sign inDemoInstall

@theme-ui/css

Package Overview
Dependencies
79
Maintainers
4
Versions
427
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
3840
43Next

0.6.0

Diff

Changelog

Source

v0.6.0

changes relative to 0.3, not the latest 0.6 prerelease

What's New

  • Styled components dict was renamed to Themed to avoid confusion with styled components constructors from @emotion/styled and similar libraries.

  • theme.useRootStyles configuration option (false by default). Set it to true to add styles.root to html instead of body.

    • theme.useBodyStyles configuration option still defaults to true, but it's going in to be deprecated in favor of theme.useRootStyles in the future.
  • New scale: transitions supporting transition CSS property. Issue #1079, PR #1272

  • Objects in nested scales can now have a __default key. PR #951

    Given the theme

    const theme = {
      colors: {
        primary: {
          __default: '#00f',
          light: '#33f',
        }
      }
    }
    

    color: 'primary' resolves to color: '#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

Breaking Changes

  • 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.colors when reading theme from useThemeUI or inside sx.
    • .colors object 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.
  • Default color mode name is no longer "default" — it's now undefined, what represents the lack of color mode set by user or detected from preferences.

  • useColorSchemeMediaQuery defaults to true. Issue #624, PR #1373

    How to migrate? Add useColorSchemeMediaQuery: false to 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. Use ThemeProvider from @theme-ui/core for local theme overrides instead.)

Deprecations

  • Styled will be removed in v0.7. Use Themed instead.
  • useBodyStyles will be removed in v0.7. Use useRootStyles instead.
hasparus
published 0.6.0-canary.8ff0379.1 •

hasparus
published 0.6.0-canary.8ff0379.0 •

hasparus
published 0.6.0-canary.d8b715d.0 •

hasparus
published 0.6.0-canary.ac60158.0 •

hasparus
published 0.6.0-canary.15c7a0b.0 •

hasparus
published 0.6.0-canary.4b34c2c.0 •

hasparus
published 0.6.0-canary.1580.da085b2e079563f137544981e74abe6ec948217d.0 •

hasparus
published 0.6.0-canary.1544.8486957e8f9c294d49d8e43485143e2186217b1e.0 •

hasparus
published 0.6.0-alpha.8 •

Changelog

Source

v0.6.0-alpha.8 2021-02-19

  • Make the rename of Styled to Themed non-breaking. Add a deprecation warning on Styled until 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 config object in theme.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc