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

feat: Add missing values for delay-* and duration #12400

Closed
wants to merge 1 commit into from

Conversation

AhmedBaset
Copy link

First of all, quoting from #11832 (comment)

Originally the opacity scale just included the values 0, 25, 50, 75, and 100. Then we added steps of 10 and we had this weird scale that was basically just steps of 10 but also had 25 and 75. Then we found ourselves wanting a bit more fine-grained control at the extreme ends of the scale and added 5 and 95, and at this point, the scale just looked like a total garage sale. But because this was in the pre-JIT days, we lived with it to avoid the file size consequences of extending the scale with all of the 5 values.

The project I'm working on right now requires a 15% value every 15 minutes and I'm sick of typing [15%] so here we are.

We have a similar case with duration-* and delay-* where we have 100, 150, 200, 300, (...), 500, (...), 700, (...), 1000. The project now uses JIT so why not have all possible values.

This PR adds 400, 600, 800, and 900 to the duration-* and delay-* utilities.

If that fits with your vision for the project I'll update the tests and docs.

@adamwathan
Copy link
Member

Hey thanks for the PR! Going to keep this scale as-is for now, as we do want to limit the choices here to make it a little easier for people to pick a value that works for them (choosing between 800ms and 900ms is tricky because it's so subtle). Might still extend this in the future, but for now going to keep things simple.

In the mean time you can always customize your own configuration or use arbitrary values to set values outside of the default scales 👍

Thanks regardless!

@adamwathan adamwathan closed this Nov 13, 2023
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

Successfully merging this pull request may close these issues.

2 participants