1.1.0 • Published 6 months ago

@overdose/theme v1.1.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
6 months ago

Theme

A CSS based theming engine for use with Overdose Figma design tokens.

Usage

yarn add @overdose/theme
yarn add @overdose/design-tokens-transformer -D

1. Import the CSS directly into your project:

// JavaScript/TypeScript

import '@overdose/theme/styles.css'
/* CSS */

@import '@overdose/theme/styles.css';

2. Generate project design tokens

Tokens from @overdose/theme work best with CSS variables generated from Figma. Check the @overdose/design-tokens-transformer docs for more information.

  1. Export design tokens from Figma using the Design Tokens plugin. Save the exported design-tokens.tokens.json file in your project.
  2. Generate tokens with:
yarn transform-design-tokens build -s "<SOURCE_PATH>" -d "<DESTINATION_PATH>"

For example:

yarn transform-design-tokens build -s "./theme/tokens/design-tokens.tokens.json" -d "./theme/__generated__/"

3. Import the generated CSS variables into your app

// JavaScript/TypeScript

import '@overdose/theme/styles.css'
import 'theme/__generated__/_tokens.css'
/* CSS */

@import '@overdose/theme/styles.css';
@import 'theme/__generated__/_tokens.css';

3. Overwrite specific variables

Variables can be overwritten when the default value is not appropriate for your project.

@import '@overdose/theme/styles.css';

:root {
  --btn-border-radius-default: 4px;
}

Check out the pwa monorepo for a full list of available variables.

1.1.0

6 months ago

1.0.0

12 months ago

0.9.1

1 year ago

0.9.0

1 year ago

0.8.0

1 year ago

0.5.0

2 years ago

0.4.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago