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

Color function values are not properly rounded #134

Open
cdoublev opened this issue May 4, 2021 · 0 comments
Open

Color function values are not properly rounded #134

cdoublev opened this issue May 4, 2021 · 0 comments

Comments

@cdoublev
Copy link

cdoublev commented May 4, 2021

This test expectation is wrong:

style.color = 'rgba(5%, 10%, 20%, 0.4)';
expect(style.color).toEqual('rgba(12, 25, 51, 0.4)');

In Chrome/Firefox:

target.style.backgroundColor = 'rgba(5%, 10%, 20%, 0.4)'
console.log(target.style.backgroundColor) // "rgba(13, 26, 51, 0.4)"

Spec:

Implementations should honor the precision of the channel as authored or calculated wherever possible. If this is not possible, the channel should be rounded towards +∞.

@cdoublev cdoublev mentioned this issue May 10, 2021
cdoublev added a commit to cdoublev/cssstyle that referenced this issue May 23, 2021
cdoublev added a commit to cdoublev/cssstyle that referenced this issue May 24, 2021
cdoublev added a commit to cdoublev/cssstyle that referenced this issue Jun 9, 2021
cdoublev added a commit to cdoublev/cssstyle that referenced this issue Jun 10, 2021
cdoublev added a commit to cdoublev/cssstyle that referenced this issue Jun 11, 2021
cdoublev added a commit to cdoublev/cssstyle that referenced this issue Jun 14, 2021
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

1 participant