Closed onurorhon closed 3 weeks ago
Suggested API seems good to me, goal is to configure like so:
{
platforms: {
css: {
mathRoundDecimals: 4,
// rest of the options
}
}
}
and the check evaluate math transform can pick up on that platform option, I'm also okay additionally to set the default value to 4 instead of 3 because em/rem
and the rounding to 4 could be significant for pixels, where 5th usually isn't.
What feature would you like?
Currently, the number of decimal places in checkAndEvaluateMath.ts is fixed to 3. We want to make this number configurable by introducing a platform option called mathRoundDecimals (or a similar name). This will allow users to define the number of decimal places according to their requirements.
Acceptance Criteria:
Here is the relevant code snippet:
Related TS plugin ticket: https://github.com/tokens-studio/figma-plugin/issues/2874
@jorenbroekema
Would you be available to contribute this feature?