-
Notifications
You must be signed in to change notification settings - Fork 4.4k
FIX: make whole details clickable #64142
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
base: trunk
Are you sure you want to change the base?
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @[email protected]. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @renishsurani! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Hi @renishsurani I'm not an expert on implementation in terms of the best practices for WP Core CSS (I'm a designer and light front-end developer), so I can't be very helpful on how this fits in the big picture. But, at seeing your video, it looks like the clickable area is where I imagined, but since you didn't hover over the revealed text underneath, I am not sure if your technique causes the revealed paragraph below to also be clickable...? You may want to test with a longer paragraph or two so everyone can see how it functions with more text. That was @carolinan 's concern in #64116. Understandably so— since this would also affect instances where someone is not using a background color and that could be unusual for people to see a clickable body paragraph in the middle of an article for instance. (if someone is using this as a standard details expander in the body of long text. I'd love to have more people weigh in on this who worked on the Details block originally and thought through all the use cases! :-) PS: Thanks! |
Thank you for trying this @renishsurani. The problem with this solution is that it only works if there are no interactive elements inside the details. |
Okay @carolinan, I understand your point. I will try and let you know if a solution is found. |
It's interesting to see and inspect how Mozilla handles their Details block and applying padding around Summary as well as separately to the bottom of the .extra div(inside the green box on this page): |
Why?
Fixes #64116
How?
Added after to make whole details block clickable.
Screenshots or screencast
Screen.Recording.2024-07-31.at.8.13.37.PM.mov