FLUID-5708: On off toggle styling needs to be update due to overflow into adjacent panels

Metadata

Source
FLUID-5708
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Justin Obara
Reporter
Kaye Mao
Created
2015-07-16T14:23:36.895-0400
Updated
2017-04-10T15:12:41.035-0400
Versions
N/A
Fixed Versions
  1. 3.0
Component
  1. Prefs Framework

Description

To replicate navigate to infusion/examples/framework/preferences/conditionalAdjusters/

Make sure there are no elements before the toggle as the vertical spacing providing by the elements will prevent the bug from triggering.

Click on/off toggle, in the "on" state, there will be overflow onto the adjacent panels.

figure 1. In css, remove overflow hidden for the toggle. Toggling "on" in the speaking panel causes overflow into the increase size panel pushing the header down

figure 2. In css, remove "list-style: hidden". Assuming it's an overflow issue, the overflow onto adjacent panels is entirely fixed but the styling for the on-toggle is broken. Meanwhile the off-toggle is not affected.
Removing resetting list-style to default in css fixes the overflow issue.

figure 3. There is an input checkbox hidden with css according to a foundation hack (see link below) that requires a "position: absolute" that when revealed is about the same size as the overflow space.
Unhiding the hidden checkbox also fixes the overflow issue

Other notes: figure 4. display-inline will temporarily fix the issue as it will align the space for the hidden checkbox with the space for the visible toggle. However it introduces the overflow issues into the prefs framework demo. Most likely caused by some combination of the toggle styling and hidden checkbox.

Suggested solution is to completely refactor the styling and semantics of the on/off toggle to make the toggle more robust and resolve this issue moving forward.

The foundation hack that is applied to the checkbox to make it visibly hidden but accessible:
Show for screen readers only
http://foundation.zurb.com/docs/components/visibility.html

.show-for-sr {
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute !important;
width: 1px;
}

Attachments

Comments