-
Notifications
You must be signed in to change notification settings - Fork 897
fix: use more robust css selectors and add additional property to pre… #9748
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: develop
Are you sure you want to change the base?
fix: use more robust css selectors and add additional property to pre… #9748
Conversation
…vent tooltip overlay from breaking screen interactions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes tooltip overlay issues that were interfering with screen interactions by implementing more robust CSS selectors and adding fallback properties to ensure the overlay doesn't block user interactions.
- Updated CSS selector from sibling selector to parent-child selector with
:has()
pseudo-class for better DOM position independence - Added
visibility: hidden
as a fallback property to ensure overlay remains non-interactive even if z-index fails
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
} | ||
|
||
.tooltip-set-thumbnail ~ .driver-overlay { | ||
.driver-active:has(.tooltip-set-thumbnail) > .driver-overlay { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The :has()
pseudo-class has limited browser support, especially in older versions of Safari and Firefox. Consider providing a fallback selector or using a JavaScript-based solution for broader compatibility.
Copilot uses AI. Check for mistakes.
Can the tool-tip and button be purple? It's hard to see with the blue over white. |
@rosics-code The design team prefers to go with blue with some newer features, so this isn't simply a dev decision to be made. However, I believe the blue-on-white is also confirmed to match accessibility/contrast standards. |
That's very interesting. Thanks for the response. |
Can it have an icon though? I feel like an icon can help more with accessibility. |
With a 2.91:1 ratio, the color fails both the WCAG AA and WCAG AAA standards (even for large text) |
Also, cheddagirl made this post asking for this decision to be confirmed with the accessibility team as she hasn't heard of any confirmation of allowing "white on blue" from them |
…vent tooltip overlay from breaking screen interactions
Resolves:
https://scratchfoundation.atlassian.net/browse/UEPR-323
Changes:
z-index
isn't successfully applied / doesn't work on specific browsers