Comments (6)
Hi @techwithshubh, thanks for the issue, do you have any proof of this?
By making this adjustment, we can significantly improve the efficiency of these components
Not just a StackOverflow post saying it is better, actual benchmarks and evidence that it is significantly better.
I was using specific transition classes for a while but opted for transition
it usually has the property I want to transition, it's also not as lazy as doing transition-all
.
from hyperui.
Hi @markmead, Thanks for the reply. I have done the performance analysis for one of the component in this page . Below are the results:
- When
transition
class is used
![Screenshot 2024-01-07 at 7 20 50 PM](https://private-user-images.githubusercontent.com/153129178/294780451-ef556a13-e9ef-41ec-bf95-226b4477009d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg4MDk1NjYsIm5iZiI6MTcwODgwOTI2NiwicGF0aCI6Ii8xNTMxMjkxNzgvMjk0NzgwNDUxLWVmNTU2YTEzLWU5ZWYtNDFlYy1iZjk1LTIyNmI0NDc3MDA5ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMjI0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDIyNFQyMTE0MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00OWQ2NDkzODBmNDE1YThmODM0YzQ2NzI4ZjA2YjU1MjIxOGMxM2FmNTQ1NTBmMWNkZDY5ZjNiNmVhNGY5MmEyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wuHyCxCavlPv8rBzlqZGORmzv9kwxqtSETuWiUSHfyQ)
- When
transition-colors
is used
![Screenshot 2024-01-07 at 7 21 52 PM](https://private-user-images.githubusercontent.com/153129178/294780479-2238d54e-29ed-4d56-99d4-5c7383968166.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg4MDk1NjYsIm5iZiI6MTcwODgwOTI2NiwicGF0aCI6Ii8xNTMxMjkxNzgvMjk0NzgwNDc5LTIyMzhkNTRlLTI5ZWQtNGQ1Ni05OWQ0LTVjNzM4Mzk2ODE2Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMjI0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDIyNFQyMTE0MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMjk5MWRiYmY2ZGMzOTcyYjMxNzE1ZTFkZGE2NWEzNzFmZWQ5M2VlYTkyZTgzYmJkNTJkMDg4NzM1ZWQwYmU5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.7QtrmWT_93OCMRqXY3gwAWgMAgu-SVP6EpGFnp0awlo)
- When
transition-[color,background-color]
is used
![Screenshot 2024-01-07 at 7 22 36 PM](https://private-user-images.githubusercontent.com/153129178/294780507-7553d18b-413a-4ee3-bbac-18b96122fc57.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg4MDk1NjYsIm5iZiI6MTcwODgwOTI2NiwicGF0aCI6Ii8xNTMxMjkxNzgvMjk0NzgwNTA3LTc1NTNkMThiLTQxM2EtNGVlMy1iYmFjLTE4Yjk2MTIyZmM1Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMjI0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDIyNFQyMTE0MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MjlhZmRlNDRiMmE3MmU2ZDhmN2ViMDdlYmY3ZDhmOTUzZTgwMDEyZjEwMDU0YmI1NDA4ODVkNGZhOThhNzg4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.xUiMPpWrXAjNfxNFHHYtqrOsB-Kuw5jL4jlf_ikwUB0)
Performance is not significantly affected, so instead of Bug, you can change the category to Nice to have feature.
from hyperui.
Thanks for this @techwithshubh! I think they are considerable improvements, would it be possible to get some more examples classes like transition-colors
with transition-[background-color]
.
Be good to see if the performance improvements are worth it for the use of JIT classes. No need to get loads of examples (or any, if you don't feel like it).
from hyperui.
@markmead , These are the other predefined transition classes provided by tailwind. https://tailwindcss.com/docs/transition-property
from hyperui.
Yeah I know of their existence. I think based on your tests they should be used, but I'm interested in seeing how they compare with JIT classes.
from hyperui.
Going to leave this for now. I think it's fine as transition
and it means users of these components are less likely to run into hover:
effects not working.
from hyperui.
Related Issues (20)
- Remove tap highlight on mobile devices for toggles HOT 2
- Add invoice components HOT 2
- Add a back to top button HOT 3
- I would like to create new quantity inputs HOT 2
- [BUG] Button UI "With Gradient Border" HOT 1
- 500 error HOT 3
- I would like to create a modal new collection HOT 8
- I would like to work on different divider sections HOT 1
- A dark color scheme HOT 2
- I would like to work on a new 'Avatars' section HOT 2
- Need to add CSS/JS file first? HOT 1
- New multi column layout component HOT 3
- [BUG] Wrong heading for the "Media" component page
- New checkbox collection HOT 1
- [BUG] Banner isn't responsive HOT 2
- [BUG] Can't run the project locally HOT 1
- [BUG] Homepage broken HOT 3
- [BUG] Inter font is not applied HOT 2
- Outside `class` class name declaration HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperui.