Add :hover media query back
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 175k
- Forks
- 78.6k
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 35
Description
Prerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
Proposal
Back in 2018/v4 a decision was made in #25270 to deprecate a hover media query due to the relatively low browser support and as such requirement of a shim to make it work.
Now the hover media query is widely supported I propose that the $enable-hover-media-query flag is added back in.
Motivation and context
To quote the original v4 docs explaining the flag:
While :hover isn’t possible on most touch devices, iOS emulates this behavior, resulting in “sticky” hover styles that persist after tapping one element. These hover styles are only removed when users tap another element. This behavior is considered largely undesirable and appears to not be an issue on Android or Windows devices.
For better or for worse this is still an issue in iOS and it would be useful to have the option to safely alleviate it.
I'm more than happy to submit a PR if it feels like there's appetite to go ahead implementing this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the prior decision in #25270 and the quoted v4 documentation, then trace how current hover styles and Sass configuration are handled. Done means restoring an opt-in $enable-hover-media-query flag with behavior that addresses sticky hover styles on iOS and updating the relevant documentation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, scss
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100