question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migration from Theme UI

See original GitHub issue

Motivation

The ecosystem behind Theme UI is growing fast. It’d be great to have a converter available for their own theme format. Also, a detailed documentation page which compares the differences between theme specs would also be very useful.

Basic example

/* theme.treat.js */

import { createTheme, fromThemeUI } from 'glaze';

export default createTheme(fromThemeUI({
  // Theme UI tokens, e.g.:
  colors: {
    text: '#000',
    background: '#fff',
    primary: '#07c',
    secondary: '#05a',
    accent: '#609',
    muted: '#f6f6f6',
  },
  fonts: {
    body: 'system-ui, sans-serif',
    heading: 'system-ui, sans-serif',
    monospace: 'Menlo, monospace',
  },
  fontWeights: {
    body: 400,
    heading: 700,
    bold: 700,
  },
  lineHeights: {
    body: 1.5,
    heading: 1.125,
  },
}));

This would even allow using existing Theme UI presets, e.g.:

/* theme.treat.js */

import { bootstrap } from '@theme-ui/presets'
import { createTheme, fromThemeUI } from 'glaze';

export default createTheme(fromThemeUI({
  ...bootstrap,
  colors: {
    ...bootstrap.colors,
    brand: '#123456',
  },
}));

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
hennessyevancommented, Apr 22, 2020

Yeah, I’ve never personally used anything other than pixels. That all makes the kind of sense that does 👍 I’ll get a draft PR going.

1reaction
hennessyevancommented, Apr 21, 2020

I’d be willing to take a stab at this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating - Theme UI
Migration : Use useThemedStylesWithMdx together with MDXProvider and useMDXComponents from @mdx-js/react ... Migration: Import it from @theme-ui/mdx instead.
Read more >
Migrate to Theme UI and shadow its components for a better ...
I've been thinking about this as well. We're definitely moving to theme-ui once we can migrate all components to TS. Then, we'll look...
Read more >
Breaking changes in v5, part one: styles and themes - MUI
This is a reference guide to all of the breaking changes introduced in Material v5, and how to handle them when migrating from...
Read more >
Why Migrate - Universal Theme - Oracle APEX
Additionally, Universal Theme utilizes several key UI features of Application Express 5 and provides a number of new Templates and Template Options that ......
Read more >
Upgrading to v2 - Chakra UI
Upgrade steps#. Here is a list of steps to migrate your project to v2. ... To opt out of this feature, set theme.config.disableTransitionOnChange...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found