You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been wondering about the necessity of z-index when hovering for the past few months. I think that the reason why z-index is given is related to display of a border between elements, but I do not understand exactly why it is necessary.
Related components (sharing the border)
Currently, the following components have z-index: 1 when hoverring:
When hovering a list item, the border flickers slightly. It may be correct when items are links or buttons. But it is strange if it is a static list. You can see in the Contextual classes docs
2. Necessity (Clarify the design specifications)
If I may ask, could you clarify the reasons to bring it to the front when hovering? This will also be related to #25165.
Component states should obey a common z-index scale: default (initial), hover (1), active (2), focus (3)
3. Consistency
If the hovering z-index is the correct specification, please consider adding it to pagination and input group as well.
Thanks.
The text was updated successfully, but these errors were encountered:
I've used overlapping borders to prevent us from having to outright remove a border. This creates a more seamless component and (I think?) reduces repaints as you modify the sub-components. By default, sibling elements that follow a particular element will be "above" those on the z-index scale (e.g., the 2nd is above the 1st, and the 3rd is above the second). So, we need to modify those on hover to allow say a darker border or background to come to the forefront. It's largely a visual design necessity, and I agree it needs uniform application.
Pagination has the z-index on hover, and input group has it in general for buttons and add-ons from the looks of it. Let me know if there are any specific lines that need updating that I missed, though!
I have been wondering about the necessity of z-index when hovering for the past few months. I think that the reason why z-index is given is related to display of a border between elements, but I do not understand exactly why it is necessary.
Related components (sharing the border)
Currently, the following components have
z-index: 1
when hoverring:button
element for background color utilities #24813)But the following components don't have:
My points:
1. List group item issue
When hovering a list item, the border flickers slightly. It may be correct when items are links or buttons. But it is strange if it is a static list. You can see in the Contextual classes docs
2. Necessity (Clarify the design specifications)
If I may ask, could you clarify the reasons to bring it to the front when hovering? This will also be related to #25165.
3. Consistency
If the hovering z-index is the correct specification, please consider adding it to pagination and input group as well.
Thanks.
The text was updated successfully, but these errors were encountered: