0.0.43 • Published 9 months ago

@mahdaad/tokens v0.0.43

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

DesignSystem css tokens

Table of Contents

Install

This project uses node and npm. Go check them out if you don't have them locally installed.

$ npm install @mahdaad/tokens

Then with a module bundler like rollup or webpack, use as you would anything else:

// using ES6 modules
import tokens from '@mahdaad/tokens'

// using CommonJS modules
var tokens = require('@mahdaad/tokens')

Usage

define CSS Variables

// main.ts
import {defineCssVars} from 'mitt'

defineCssVars()

get css variable

import {getCssCoreColor} from 'mitt'

getCssCoreColor('primary-5')

get css variable

import {getCoreHexColor, getCoreHexColorList, getCssCoreColorList, getCssCoreColor} from 'mitt'

getCoreHexColor('primary-5') // #xxxxxx
getCssCoreColor('primary-5') // rgba(var(--mt-primary-5), 1)
getCoreHexColorList(['primary-5', 'blue-2'])
getCssCoreColorList(['primary-5', 'blue-2'])

variables

import {
    _colors,
    classColors, 
    systemTheme, 
    tokensEmitter,
    lessVars,
    prefixComponentCore,
    prefixClsCore
} from 'mitt'
0.0.43

9 months ago

0.0.40

10 months ago

0.0.41

10 months ago

0.0.42

10 months ago

0.0.39

10 months ago

0.0.37

12 months ago

0.0.38

11 months ago

0.0.32

1 year ago

0.0.33

1 year ago

0.0.34

1 year ago

0.0.35

1 year ago

0.0.36

1 year ago

0.0.30

1 year ago

0.0.29

1 year ago

0.0.28

1 year ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.25

1 year ago

0.0.26

1 year ago

0.0.27

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago