Skip to content

Commit 26cb9ab

Browse files
authored
Merge pull request #2428 from basho/dpb/safari_flicker_fix
Safari flicker fix
2 parents fc698ef + 15560ac commit 26cb9ab

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

Diff for: dynamic/css/main.scss

+4
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@
4545
'pages/index',
4646
'pages/developing/getting-started',
4747
'pages/learning/use-cases';
48+
49+
// 7. Styles so shameful they get their own directory
50+
@import
51+
'shame/safari-text-flicker-fix';

Diff for: dynamic/css/shame/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Shame
2+
3+
If you write a rule that should not be written, a work-around for non-compliant
4+
browser behavior, a fix the standard should be fixing itself, a hack that makes
5+
you ashamed of yourself as you're writing it... That rule belongs here.
6+
7+
Hopefully the rules written here will be temporary (for some definition of
8+
"temporary"), and browsers and the CSS standard will eventually be robust enough
9+
that we don't need to be ashamed of ourselves. Until then, we should sequester
10+
the worst of our rules somewhere s.t. we know what should be fixed first.
11+
12+
This is not part of the 7-1 architecture, and so has no reference.

Diff for: dynamic/css/shame/_safari-text-flicker-fix.scss

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* An issue was observed in Safari where hovering over sub-headings -- which
3+
* would case a doc icon's opacity to transition from 0 to 1 -- was causing all
4+
* of the text in the main article to flicker. More specifically, it was losing,
5+
* and then regaining a certain amount of clarity.
6+
*
7+
* It turns this was caused by Safari changing the entire element from a 2D
8+
* object to a 3D object for the duration of the transition.
9+
*
10+
* This rule sets the entire element to a 3D object _at load time_ to prevent
11+
* the change from occurring. How stupid is that?
12+
*
13+
* The issue was last observed on Safari Version 10.0.3 (11602.4.8.0.1) running
14+
* in OS X 10.11.6 (15G1217) on a MacBook Pro (Retina, 15-inch, Mid 2014)
15+
* Fix found on http://stackoverflow.com/questions/30637358
16+
*/
17+
.main-article {
18+
-webkit-transform: translate3d(0, 0, 0);
19+
}

Diff for: static/css/main.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)