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
{{ message }}
Repository navigation
Use a single class name for opened/expanded/shown state of widgets? #19344
Currently, we toggle the .open class on .dropdown-menu to open/close a dropdown menu, we toggle the .active class on .tab-pane to show/hide a tab pane, and we toggle the .in class on .collapse to (un)collapse a collapsible widget. (And likewise for other widgets.)
The suggestion is to use one class name (e.g. .active) instead of different ones (.open, .active, .in) in all these cases. So you'd always toggle .active to (de)activate a widget, regardless of which widget it is.
Basically we'd globally find-replace .open, .active, and .in with .active (or whatever single name we end up agreeing on).
Activity
cvrebert commentedon Mar 14, 2016
@mdo @XhmikosR SGTY?
XhmikosR commentedon Mar 14, 2016
I'm not quite sure I understand the suggestion. Can you share an example of how this would be?
cvrebert commentedon Mar 14, 2016
Currently, we toggle the
.openclass on.dropdown-menuto open/close a dropdown menu, we toggle the.activeclass on.tab-paneto show/hide a tab pane, and we toggle the.inclass on.collapseto (un)collapse a collapsible widget. (And likewise for other widgets.)The suggestion is to use one class name (e.g.
.active) instead of different ones (.open,.active,.in) in all these cases. So you'd always toggle.activeto (de)activate a widget, regardless of which widget it is.Basically we'd globally find-replace
.open,.active, and.inwith.active(or whatever single name we end up agreeing on).XhmikosR commentedon Mar 14, 2016
Seems, simpler indeed, but what is the caveat? Or it's like that from the old days?
cvrebert commentedon Mar 14, 2016
AFAICT, old days.
XhmikosR commentedon Mar 14, 2016
Then, I don't see any reason not to do this. It's clearly simpler.
mdo commentedon Oct 24, 2016
I'm down for this. I'm thinking
.activecould work well for everything?Merge pull request twbs#20982 from Johann-S/fix19344