Skip to content

Commit cb0f3e0

Browse files
Merge pull request #140 from lukasoppermann/cleanup-color
Cleanup color
2 parents 72a5f5b + b0d23d7 commit cb0f3e0

20 files changed

Lines changed: 329 additions & 869 deletions

README.md

Lines changed: 215 additions & 433 deletions
Large diffs are not rendered by default.

src/build.test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ describe('index.js', () => {
1010
it('all transformers are attached', () => {
1111
expect(StyleDictionary.hooks.transforms['clamp/css']).toBeDefined()
1212
expect(StyleDictionary.hooks.transforms['color/css']).toBeDefined()
13-
expect(StyleDictionary.hooks.transforms['color/hex']).toBeDefined()
14-
expect(StyleDictionary.hooks.transforms['color/hexAlpha']).toBeDefined()
15-
expect(StyleDictionary.hooks.transforms['color/rgba']).toBeDefined()
16-
expect(StyleDictionary.hooks.transforms['color/rgbaFloat']).toBeDefined()
17-
expect(StyleDictionary.hooks.transforms['color/rgbAlpha']).toBeDefined()
1813
expect(StyleDictionary.hooks.transforms['comment/deprecated']).toBeDefined()
1914
expect(StyleDictionary.hooks.transforms['cubicBezier/css']).toBeDefined()
2015
expect(StyleDictionary.hooks.transforms['dimension/pixelToRem']).toBeDefined()

src/index.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ describe('index.ts', () => {
1212
it('all transformers are attached', () => {
1313
expect(StyleDictionary.hooks.transforms['clamp/css']).toBeDefined()
1414
expect(StyleDictionary.hooks.transforms['color/css']).toBeDefined()
15-
expect(StyleDictionary.hooks.transforms['color/hex']).toBeDefined()
16-
expect(StyleDictionary.hooks.transforms['color/hexAlpha']).toBeDefined()
17-
expect(StyleDictionary.hooks.transforms['color/rgba']).toBeDefined()
18-
expect(StyleDictionary.hooks.transforms['color/rgbaFloat']).toBeDefined()
19-
expect(StyleDictionary.hooks.transforms['color/rgbAlpha']).toBeDefined()
2015
expect(StyleDictionary.hooks.transforms['comment/deprecated']).toBeDefined()
2116
expect(StyleDictionary.hooks.transforms['cubicBezier/css']).toBeDefined()
2217
expect(StyleDictionary.hooks.transforms['dimension/pixelToRem']).toBeDefined()

src/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import {borderCss} from './transformer/border-css.js'
22
import {clampCss} from './transformer/clamp-css.js'
3-
import {colorAlphaToHex} from './transformer/color-alpha-to-hex.js'
4-
import {colorAlphaToRgba} from './transformer/color-alpha-to-rgba.js'
53
import {colorToCss} from './transformer/color-to-css.js'
6-
import {colorToHex} from './transformer/color-to-hex.js'
7-
import {colorToRgba} from './transformer/color-to-rgba.js'
8-
import {colorToRgbaFloat} from './transformer/color-to-rgba-float.js'
94
import {commentDeprecated} from './transformer/comment-deprecated.js'
105
import {cssAdvanced} from './format/css-advanced.js'
116
import {cssExtended} from './transformGroups/css-extended.js'
@@ -61,12 +56,7 @@ OrigialStyleDictionary.registerFormat(typescriptEsmDeclarations)
6156
*/
6257
OrigialStyleDictionary.registerTransform(borderCss)
6358
OrigialStyleDictionary.registerTransform(clampCss)
64-
OrigialStyleDictionary.registerTransform(colorAlphaToHex)
65-
OrigialStyleDictionary.registerTransform(colorAlphaToRgba)
6659
OrigialStyleDictionary.registerTransform(colorToCss)
67-
OrigialStyleDictionary.registerTransform(colorToHex)
68-
OrigialStyleDictionary.registerTransform(colorToRgba)
69-
OrigialStyleDictionary.registerTransform(colorToRgbaFloat)
7060
OrigialStyleDictionary.registerTransform(commentDeprecated)
7161
OrigialStyleDictionary.registerTransform(cubicBezierCss)
7262
OrigialStyleDictionary.registerTransform(dimensionPixelToRem)

src/transformGroups/css-extended.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('TransformGroup: css extended', () => {
1313

1414
const extensionArray = [
1515
'border/css',
16-
'color/rgbAlpha',
16+
'color/css',
1717
'cubicBezier/css',
1818
'font/css',
1919
'fontFamily/css',

src/transformGroups/css-extended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const cssExtended = {
55
transforms: [
66
...styleDictionary.hooks.transformGroups['css'],
77
'border/css',
8-
'color/rgbAlpha',
8+
'color/css',
99
'cubicBezier/css',
1010
'font/css',
1111
'fontFamily/css',

src/transformer/color-alpha-to-hex.test.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/transformer/color-alpha-to-hex.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/transformer/color-alpha-to-rgba.test.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/transformer/color-alpha-to-rgba.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)