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

Feature request: support theme-ui spec #9

Closed
yairEO opened this issue Sep 5, 2020 · 2 comments
Closed

Feature request: support theme-ui spec #9

yairEO opened this issue Sep 5, 2020 · 2 comments

Comments

@yairEO
Copy link

yairEO commented Sep 5, 2020

https://github.com/system-ui/theme-ui
https://theme-ui.com/theming

I've been using a lot the above spec and would love to see conversion support in json-to-scss for the above spec.

I assume things like:

fontSizes: [12, 14, 16]

should be converted to SASS list:

$fontSizes: 12px, 14px, 16px;

I have written regarding this here as well

@rlapoele
Copy link
Owner

rlapoele commented Sep 7, 2020

Hi @yairEO,

If your ask is for json-to-scss to automatically convert unitless js/JSON numbers to pixel lengths, I'm sorry but I don't think it's going to happen.
While technically, this is do-able, I don't believe that this kind of behavior would work for everyone and/or every numerical values.
For example, what about a possible line height such as lineHeight: 1.5 ?
I, in most if not all cases, would not want the tool to produce something like $lineHeight: 1.5px

Also, and while I understand why some js driven css spec / libraries would consider making certain assumptions for length units, I don't think this would make total sense for json-to-scss.

For these reasons, I won't implement such changes for now.

In case I misunderstood your request, please let me know.

@yairEO
Copy link
Author

yairEO commented Sep 30, 2020

Thank you for your time reflecting on this

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