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

counting from negative to positive and separator style issues #2

Open
Graphicfort opened this issue Oct 16, 2023 · 0 comments
Open

Comments

@Graphicfort
Copy link

Graphicfort commented Oct 16, 2023

From https://codepen.io/msoler75/pen/NWLzNYj

1- separator style issue:
From the codepen example, you can see that there are space between the , and the number (99 , 999) this happened because of the width of the first span element.
Suggestion; add a class to the span element and set it's width to 0 to remove the extra spaces between the comma and the number, this will convert the number from 99 , 999 to 99,999

2- counting from negative to positive issue:
From the codepen change the code to

const counter = new CountUp("counter", 5, {
   startVal: -1,
    plugin: new Odometer({ duration: 2.3, delay: 0 }),
    duration: 3.0
});

This will shift the number 5 to the left and add extra 1 empty space the space could be different if you changed the number -1 to -10, this will shift the number 5 to the left by 2 spaces, this happened because the length of the negative number greater than the positive number

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