From 8d00d8e6bbdcec4cf81007c85e1a791f07edc00f Mon Sep 17 00:00:00 2001 From: Danny Banks Date: Fri, 8 Jun 2018 10:08:15 -0700 Subject: [PATCH] 2.2.0 --- docs/formats.md | 12 ++++++------ docs/transform_groups.md | 5 +++-- docs/transforms.md | 15 +++++++++++++++ example/complete/package.json | 2 +- example/npm/package.json | 2 +- example/react/package.json | 2 +- example/s3/package.json | 2 +- package-lock.json | 2 +- package.json | 2 +- 9 files changed, 30 insertions(+), 14 deletions(-) diff --git a/docs/formats.md b/docs/formats.md index e7cbc7dfe..231c8952a 100644 --- a/docs/formats.md +++ b/docs/formats.md @@ -83,11 +83,11 @@ $content-icon-email: '\E001'; Creates a LESS file with variable definitions based on the style dictionary +**Color-background-base:**: #f0f0f0; +**Color-background-alt:**: #eeeeee; +``` **Example** ```less -@color-background-base: #f0f0f0; -@color-background-alt: #eeeeee; -``` * * * @@ -96,11 +96,11 @@ Creates a LESS file with variable definitions based on the style dictionary Creates a LESS file with variable definitions and helper classes for icons +**Content-icon-email:**: '\E001'; +.icon.email:before { content:@content-icon-email; } +``` **Example** ```less -@content-icon-email: '\E001'; -.icon.email:before { content:@content-icon-email; } -``` * * * diff --git a/docs/transform_groups.md b/docs/transform_groups.md index 388c46de0..9f38f8e49 100644 --- a/docs/transform_groups.md +++ b/docs/transform_groups.md @@ -29,7 +29,7 @@ Transforms: [attribute/cti](transforms.md#attributecti) [name/cti/kebab](transforms.md#namectikebab) [size/px](transforms.md#sizepx) -[color/hex](transforms.md#colorhex) +[color/css](transforms.md#colorcss) * * * @@ -44,7 +44,8 @@ Transforms: [time/seconds](transforms.md#timeseconds) [content/icon](transforms.md#contenticon) [size/rem](transforms.md#sizerem) -[color/hex](transforms.md#colorhex) +[color/css](transforms.md#colorcss) + * * * diff --git a/docs/transforms.md b/docs/transforms.md index b0a2282f8..49c70d914 100644 --- a/docs/transforms.md +++ b/docs/transforms.md @@ -245,6 +245,21 @@ Transforms the value into an UIColor class for iOS ``` +* * * + +### color/css + + +Transforms the value into a hex or rgb string depending on if it has transparency + +```css +// Matches: prop.attributes.category === 'color' +// Returns: +#000000 +rgba(0,0,0,0.5) +``` + + * * * ### size/sp diff --git a/example/complete/package.json b/example/complete/package.json index ff442979a..3dc389f76 100644 --- a/example/complete/package.json +++ b/example/complete/package.json @@ -10,6 +10,6 @@ "author": "", "license": "Apache-2.0", "devDependencies": { - "style-dictionary": "2.1.0" + "style-dictionary": "2.2.0" } } \ No newline at end of file diff --git a/example/npm/package.json b/example/npm/package.json index 006b950a7..d600426ca 100644 --- a/example/npm/package.json +++ b/example/npm/package.json @@ -18,6 +18,6 @@ "author": "", "license": "Apache-2.0", "devDependencies": { - "style-dictionary": "2.1.0" + "style-dictionary": "2.2.0" } } \ No newline at end of file diff --git a/example/react/package.json b/example/react/package.json index 5b5f405c0..657e02d87 100644 --- a/example/react/package.json +++ b/example/react/package.json @@ -10,6 +10,6 @@ "author": "", "license": "Apache-2.0", "devDependencies": { - "style-dictionary": "2.1.0" + "style-dictionary": "2.2.0" } } \ No newline at end of file diff --git a/example/s3/package.json b/example/s3/package.json index e84a74ec6..aa345ba35 100644 --- a/example/s3/package.json +++ b/example/s3/package.json @@ -14,6 +14,6 @@ "devDependencies": { "aws-sdk": "^2.7.21", "fs-extra": "^1.0.0", - "style-dictionary": "2.1.0" + "style-dictionary": "2.2.0" } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c4d7ecb96..37f6dcdd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "style-dictionary", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3aa307546..5b1a97965 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "style-dictionary", - "version": "2.1.0", + "version": "2.2.0", "description": "Style once, use everywhere. A build system for creating cross-platform styles.", "keywords": [ "style dictionary",