WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
32535
Links move a little when hovered over, when using custom fonts and webkit-transform rotation.
https://bugs.webkit.org/show_bug.cgi?id=32535
Summary
Links move a little when hovered over, when using custom fonts and webkit-tra...
Cabel Sasser
Reported
2009-12-14 17:36:38 PST
Created
attachment 44829
[details]
An animated gif showing the shifting. That's one mouthful of a summary. Let me explain: SETUP: - We're using @font-face to load custom fonts from TypeKit. - Then we're putting that custom text in a <div> that is rotated slightly using -webkit-transform: rotate(). - Contained within the text itself are some links. STEPS TO REPRODUCE: Hover over any of the handwritten-styled links in the body of the sample URL. RESULTS: The text moves very slightly — one pixel down, one pixel to the left? — until locking into place. It looks weird. When the browser is refreshed, it happens again, until they've all been hovered over. EXPECTED: The text does not move at all when hovered over. NOTES: The particular font is called "Good Dog". It's not happening with the typewriter text in the header of the card, so maybe it's particular to this font? A bug in the font? The attached animated .gif shows the shifting.
Attachments
An animated gif showing the shifting.
(6.82 KB, image/gif)
2009-12-14 17:36 PST
,
Cabel Sasser
no flags
Details
Testcase
(50.78 KB, text/html)
2010-01-12 11:37 PST
,
Simon Fraser (smfr)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2009-12-15 09:49:48 PST
The element in question has a 0.03deg rotation, so I think there's some pixel rounding in CG going on here.
Cabel Sasser
Comment 2
2009-12-15 11:14:03 PST
(Note that, in this particular case, the rotation is randomly chosen via Javascript on page load. But applying a fixed rotation would undoubtedly work as well. Let me know if you need a reduced test case.)
Simon Fraser (smfr)
Comment 3
2009-12-15 11:16:04 PST
A reduced testcase that doesn't rely on TypeKit would be good.
Cabel Sasser
Comment 4
2009-12-15 11:47:50 PST
(In reply to
comment #3
)
> A reduced testcase that doesn't rely on TypeKit would be good.
No problem. Here's a page that doesn't link to TypeKit. The font is included in a static CSS file.
http://www.panic.com/~cabel/safari-32535.html
However, when I tried to create a quick barebones test case:
http://www.panic.com/~cabel/safari-32535-reduced.html
The problem does _not_ show up. As I'm sure you're familiar with, it'll take some time to try to isolate the element that triggers it...
Cabel Sasser
Comment 5
2010-01-12 11:05:41 PST
(In reply to
comment #3
)
> A reduced testcase that doesn't rely on TypeKit would be good.
Simon, We finally got around to narrowing down the element that causes the shifting. This example also does not require TypeKit. I must say, it's a mystery, though. :) Check this out:
http://www.panic.com/~cabel/safari-32535-reduced-working.html
There's a <span> at the bottom ("I am the span responsible for text shifting!"). If you comment out that <span>, the text shifting when you hover over a link goes away. If you include it, the text shifting comes back. Let me know if there's anything else we can do to help.
Simon Fraser (smfr)
Comment 6
2010-01-12 11:10:23 PST
Thanks for the testcase. I think it could be reduced a lot more though. Bring all the CSS into the document, and hack away until everything unneeded is gone.
Cabel Sasser
Comment 7
2010-01-12 11:33:36 PST
(In reply to
comment #6
)
> Thanks for the testcase. I think it could be reduced a lot more though. Bring > all the CSS into the document, and hack away until everything unneeded is gone.
OK, then. :) Here's as reduced as we can make it. Everything is inline, and only necessary bits are included in the code.
http://www.panic.com/~cabel/safari-32535-micro.html
Once again, hovering over the links shifts the letters slightly. It drives us crazy. The rest is up to you! :) We're super curious. Good luck! (I've removed the other pages to avoid confusion.)
Simon Fraser (smfr)
Comment 8
2010-01-12 11:37:56 PST
Created
attachment 46386
[details]
Testcase Always better to have the testcase in Bugzilla. External links have a habit of going 404. Thanks!
Cabel Sasser
Comment 9
2010-01-12 11:40:44 PST
(Removed NeedsReduction from Keywords. Hope that was the right thing to do.)
mitz
Comment 10
2010-01-12 12:04:10 PST
(In reply to
comment #9
)
> (Removed NeedsReduction from Keywords. Hope that was the right thing to do.)
Yes. You could have also added the HasReduction keyword, like I just did.
Simon Fraser (smfr)
Comment 11
2010-07-07 17:56:20 PDT
<
rdar://problem/8169180
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug