GNOME Bugzilla – Bug 764524
CSS margin transition not smooth
Last modified: 2018-05-02 17:01:54 UTC
Quite all CSS transitions are working smoothly, but it’s not the case of a transition of a “margin” property. You can test it for example with the following code in a Widget Factory, but I had initially the problem with a “modelbutton” node (and it’s tested either with “linear” or “ease”). button.toggle { margin:0px 5px; transition:margin 2s linear 0s; } button.toggle:hover { margin:0px; } I’d say the problem is that the transition is calculated pixel by pixel but with one more step than really needed, so it’s waiting twice at the start or end step (depending of “ease” or “linear”) of the transition.
Between 5px and 0px, there's only 6 possible steps we can make, so there's strict limits to how smooth this can be
Of course. The problem is that for what I perceive, it’s dividing the animation time in 6, instead of in 5 (0px→1, 1→2, 2→3, 3→4, 4→5px).
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/611.