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

Add precision #33

Open
PaulWoitaschek opened this issue May 30, 2018 · 2 comments
Open

Add precision #33

PaulWoitaschek opened this issue May 30, 2018 · 2 comments

Comments

@PaulWoitaschek
Copy link

SVGO supports setting a precision value:
-p PRECISION, --precision=PRECISION : Set number of digits in the fractional part, overrides plugins params

I often see lint warnings because my vector paths are too long. It suggests me to decrease the float precision. It would be great if avocado supported this too.
Together with rewriting paths this could decrease the complexity of the vector quite a bit.

@valeriyo
Copy link

Yes, default precision is 3 decimals, and usually 1 is quite enough.

@emartynov
Copy link

I'm not an expert in JS. I plan to look into https://github.com/alexjlockwood/avocado/blob/master/src/plugins/convertPathData.ts and play with precision. If it works I will try to make it as an option.

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

3 participants