Solving the sticky hover effect on Mobile with TailwindCSS
truongductri01
Posted on April 9, 2023
Here is the video explaining the concepts of avoiding using hover on device not supporting the feature: https://youtu.be/uuluAyw9AI0.
This just talk about the CSS approach.
For Tailwind, the team has developed a configuration in the tailwind.config.js
file that only support hover when needed:
// tailwind.config.js
module.exports = {
future: {
hoverOnlyWhenSupported: true,
},
// ...
}
💖 💪 🙅 🚩
truongductri01
Posted on April 9, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.