I have a problem with -webkit-transition in Safari. These transitions work fine in Chrome, FF, and IE10 (using a property with a transition prefix).
There are 3 panels on my website that can be viewed. The main one opens by default, and the remaining 2 are minimized to the right of the window, showing a ribbon of their contents. When the clicked panel is pressed, an additional class is added to it via JS, and it switches to 100% width.
CSS
.panel-1{ width: 100%; } .panel-2{ width: 8rem; position: absolute; top: 0; right: 0; overflow: hidden; z-index: 500; transition: all 0.5s; -webkit-transition: all 0.5s; } .panel-2:hover{ width: 10rem; } .panel-2.panel-open{ width: 100%; } .panel-3{ width: 4rem; position: absolute; top: 0; right: 0; overflow: hidden; z-index: 501; transition: all 0.5s; -webkit-transition: all 0.5s; } .panel-3:hover{ width: 6rem; } .panel-3.panel-open{ width: 100%; }
The problem is the difference in units. Guidance transitions work as intended (from rem to rem ), however the width transition ( rem to % ) in the "open-open" panel skips the transition and simply opens. If I switch the default width to percent instead of rem , the transition works again. I canโt do this, as this is a liquid site, and the width of the panel caving should be static, not relative.
I tried adding min-width to % , but that didn't help. Any advice on this would be greatly appreciated.
source share