Bug 55600 - CSS transition problem with padding and margin.
Summary: CSS transition problem with padding and margin.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-03-02 12:02 PST by Myke Atkinson
Modified: 2022-07-12 14:25 PDT (History)
7 users (show)

See Also:


Attachments
A simple HTML document which shows the problem. (637 bytes, text/html)
2011-03-02 12:02 PST, Myke Atkinson
no flags Details
A modification of the first test to show more problems with the bug. (1.11 KB, text/html)
2011-05-02 11:57 PDT, Myke Atkinson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Myke Atkinson 2011-03-02 12:02:02 PST
Created attachment 84444 [details]
A simple HTML document which shows the problem.

I was playing around with some CSS3 transition effects and stumbled upon this weird visual 'click' when the padding or margin of an item is transferred from left to right. The same result happens when using either padding or margin, as well as when you specify in pixels or ems. I have attached the HTML document which showed me the hiccup.

If you have any questions, feel free to email me: mykeatkinson@gmail.com.

Thanks for all your hard work!

-Myke
Comment 1 Simon Fraser (smfr) 2011-03-02 22:43:44 PST
I think because of rounding the two animating padding values don't always add up to the same number.
Comment 2 Myke Atkinson 2011-05-02 11:57:56 PDT
Created attachment 91949 [details]
A modification of the first test to show more problems with the bug.

As submitted to me by Paul Court (pcourt@gmail.com):

If you set the transition time to something longer, say 10s, and then constantly move your mouse in and out of the element in question, you can actually get the margin/padding to completely collapse to 0.

Also, if you hold your mouse over for the full ten seconds the visible click keeps happening over and over.
Comment 3 Simon Fraser (smfr) 2011-05-02 12:02:49 PDT
I think you're seeing rounding errors; we aren't smart enough to ensure that transitions on two side of an element, or two adjacent elements don't result in rounding differences.
Comment 4 Brent Fulgham 2022-07-12 14:25:22 PDT
Chrome and Firefox handle this properly, but Safari adds a fun little wiggle to the first letter of the word.
Comment 5 Radar WebKit Bug Importer 2022-07-12 14:25:42 PDT
<rdar://problem/96910392>