css-toggle
css-toggle copied to clipboard
Do we need a one-directional (UA -> toggle state) variant of toggle-visibility?
I think it's possible that it would be good to have a one-directional variant of toggle-visibility
. Currently toggle-visibility
does two things:
- It hides/shows the element based on the state of the toggle
- It changes the state of the toggle if a UA feature such as find-in-page wants to show the contents of the element.
I think there are use cases that may want (2) but not (1). For example, in a carousel where the selected pane is visible, but edges of the adjacent panes are also visible, part (1) might be inappropriate, and the style sheet might want to hide the other panes using some other mechanism (e.g., transforms and clipping). However, if this is necessary, it might be undesirable to give up the features of (2).