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

A Bug with background: #FF0; #60

Closed
OsamaAbbas opened this issue Mar 5, 2016 · 3 comments
Closed

A Bug with background: #FF0; #60

OsamaAbbas opened this issue Mar 5, 2016 · 3 comments
Labels

Comments

@OsamaAbbas
Copy link

Hi Mohammad,

Please check these processes:

> require('rtlcss').process(`body { color: #ff0; }`);
// output: 'body { color: #ff0; }'

> require('rtlcss').process(`body { background: #ff0; }`);
// output: 'body { background: #ff100%; }' WRONG

> require('rtlcss').process(`body { background: #ff1; }`);
// output: 'body { background: #ff1; }'

> require('rtlcss').process(`body { background: #ee0; }`);
// output: 'body { background: #ee100%; }' WRONG

> require('rtlcss').process(`body { background: #f00; }`);
// output: 'body { background: #f00; }'

> require('rtlcss').process(`body { background: #f0f; }`);
// output: 'body { background: #f100%f; }' WRONG

> require('rtlcss').process(`body { background: #0ff; }`);
// output: 'body { background: #100%ff; }' WRONG

> require('rtlcss').process(`body { background: #fffff0; }`)
// output: 'body { background: #fffff100%; }' WRONG

It seems like if there was one zero digit in hex-colors it would be converted weirdly. Only with one zero, and only with background property.

@MohammadYounes
Copy link
Owner

@OsamaAbbas Thanks for reporting this! It's due to this special case.

@OsamaAbbas
Copy link
Author

I have tried to find why this happens, but I failed. Now it makes sense.

Thank you for this wonderful tool!

@MohammadYounes
Copy link
Owner

My pleasure :)

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

No branches or pull requests

2 participants