Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theo doesn't parse hex values for color #3

Open
MindSculpt opened this issue Dec 11, 2017 · 3 comments
Open

Theo doesn't parse hex values for color #3

MindSculpt opened this issue Dec 11, 2017 · 3 comments

Comments

@MindSculpt
Copy link

MindSculpt commented Dec 11, 2017

Unless I'm missing something, if I have the following in my aliases.yml:

---
aliases:
  # colors
  dark-blue: #003e52
  orange: #c18510

The output doesn't read hex values and I get:

$dark-blue: rgb(0, 0, 0);
$orange rgb(0, 0, 0);

...for all colors.

I'm also noticing the ability to just pass through token values that don't necessarily map to one of your existing formats. Might be worth allowing a general type/category for this.

@MindSculpt
Copy link
Author

MindSculpt commented Dec 11, 2017

Nevermind—the hex issue was totally my fault. This works fine. I'd still love your thoughts on being able to add other design tokens that might not fit into the categories you provide (even though they are thorough).

@julzmon
Copy link

julzmon commented Jul 9, 2018

@MindSculpt could you please tell me how you solved the issue? I'm trying to figure this out.

@MindSculpt
Copy link
Author

@julzmon I wound up adding colors to my _aliases.yml file like this:

aliases:
  #colors
  white: '#fff'
  black: '#000'

Then I created a _color.yml file where I have the following:

imports:
 - _aliases.yml

props: 
  white: "{!white}"
    type: color
    category: text-color
    comment: ""

  black: "{!black}"
    type: color
    category: text-color
    comment: ""

Then obviously import _color.yml into your main app.yml file. This seems to get around not having categories that map since I'm just using this to generate the tokens, not the styles doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants