Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
[refs #271] Remove Safari Repaint Hack
Browse files Browse the repository at this point in the history
Safari exhibited an unusual bug whereby any rem-sized text appearing
anywhere after a DETAILS element was rendered impossibly small. Like,
1px kinda size. The/a way of getting around it was to force a full-page
repaint, which is icky, but it was scoped to only Safari users.

Anyway! Good news is that the bug has been fixed[1] so we can delete the
hack, which is nice.

1. https://bugs.webkit.org/show_bug.cgi?id=173876
  • Loading branch information
csswizardry committed Oct 22, 2019
1 parent f4cecf9 commit 46760f4
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1648,23 +1648,5 @@ <h4>Footer Title</h4>

</footer>

<script>
// Eww, eww, ewwww! Forcing a repaint to get around a really, really odd
// Safari bug: https://twitter.com/csswizardry/status/897110955448029184
(function(){
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('safari') != -1) {
if (ua.indexOf('chrome') > -1) {
} else {
function ready() {
var page = document.getElementById('jsPage');
page.style.color = '#231f21';
};
document.addEventListener("DOMContentLoaded", ready);
}
}
}());
</script>

</body>
</html>

0 comments on commit 46760f4

Please sign in to comment.