Skip to content

design tokens : fix documentation and unit conversion #799

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

Conversation

romainmenke
Copy link
Member

No description provided.

Comment on lines -134 to +144
for (let i = fixedPrecision.length; i > 0; i--) {
for (let i = fixedPrecision.length - 1; i >= 0; i--) {
if (fixedPrecision[i] === '.') {
break;
}

if (fixedPrecision[i] !== '0') {
fixedPrecision = fixedPrecision.slice(0, i + 1);
if (fixedPrecision[i] === '0') {
fixedPrecision = fixedPrecision.slice(0, i);
continue;
}

break;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what happened when I initially wrote this.
It was obviously incorrect.

Noticed it when the docs updated and I saw 1.1 where I expected 1.125

Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM! Thanks for fixing this!

@romainmenke romainmenke merged commit a4bf0ee into main Jan 24, 2023
@romainmenke romainmenke deleted the design-tokens-fix-unit-conversion--considerate-black-russian-terrier-6b5b7c7fa6 branch January 24, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants