Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Element twitches in Chrome - CSS width transition

My element twitches when I use width transition in Chrome. How can I fix this?

.search-group input {
   width: 85px;
   -webkit-transition: all ease-in-out .15s;
   transition: all ease-in-out .15s;
}
.search-group input:focus {
   width: 150px;
   outline: none;
}

JSFIDDLE

VIDEO(sorry for quality)

like image 532
user3715760 Avatar asked Mar 22 '26 13:03

user3715760


1 Answers

Ok I think i fixed it. I added:

.window_label{
    -webkit-backface-visibility: hidden;
}

jsfiddle

At least on my machine it fixes the twitching for Chrome. I found out that it was a official bug, as stated here, here and many other places on the Internet.

As stated in the comments, this bug affects elements with altered opacity.

EDIT: Try this jsfiddle. I think I fixed it. I'm leaving the above resolution because it can serve someone. Anyway the problem was with

display:table

It was bugged and when the extra '}' appeared, it nullified the '.search-group' field css.

I moved the display option form there to '.header-search' and here is the end result:

.header-search {
    position: absolute;
    top: 6px;
    right: 10px;
    display: table;
}
.search-group {
    position: relative;
    border-collapse: separate;
    display: table-row;
    float: right;
}

for me it solves the problem. Try it and tell me if it fixes it for you too.

like image 155
Hristo Valkanov Avatar answered Mar 25 '26 01:03

Hristo Valkanov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!