connectivedx / Phoenix

http://connectivedx.github.io/Phoenix/
33 stars 5 forks source link

Add `!important` to active tab panel display #51

Closed elseloop closed 10 years ago

elseloop commented 10 years ago

When the tabs move from a tab layout down to the accordion layout, are interacted with then left in a state where all accordion fields are closed, and the window is then resized back up to the tab layout, no tab panes will are visible.

Using !important here forces the active tab panel to display, overriding the inline style: display:none; leftover from the accordion interactions. !important is obviously ugly but the selector it’s on is super specific (.responsive-tabs__panel--closed-accordion-only), so it’s almost certainly safe; it’s being used in place of several lines of javascript and therefore seems like a good tradeoff; and the original CSS source that ships with the plugin uses !important in this same context as well.

ajmueller commented 10 years ago

As discussed with @stoff and you earlier today, this looks great. Thanks for finding this!