public
Created

Fragment interaction with CSS.

  • Download Gist
is_this_a_bug.html
Liquid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>FF 15.0.1 Bug?</title>
<meta name="description" content="Shows a bug if FF 15.0.1" />
<meta name="author" content="Manuel Vazquez Acosta" />
 
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
 
<style>
/* Make the container visible */
.container {
width: 500px;
height: 400px;
position: relative; /* make it a viewport for abs positioned elems */
border: 1px solid #00f;
}
/* Make the sliding-tabs container visible */
.sliding-tabs {
display: block;
width: 300px;
height: 400px;
border: 1px solid #f00;
position: absolute;
right: 0;
}
.tab-content {
position: absolute;
right: 0;
/* If overflow is not hidden the bug does not shows */
overflow: hidden;
border: 1px dashed #0f0;
width: 90%;
height: 100%;
}
.tab-pane, .tab-pane:focus, .tab-pane:active {
display: block;
background-color: #ccc;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 100%;
position: absolute;
}
.tab-pane.l {
-moz-transition: left 0.4s ease-in-out;
transition: left 0.4s ease-in-out;
 
left: 100%;
}
</style>
</head>
 
<body>
<div class="container">
<div class="sliding-tabs">
<div class="tab-content">
<div class="tab-pane l" id="00">
Tab Pane 00
</div>
<div class="tab-pane l" id="01">
Tab Pane 01
</div>
</div>
</div>
</div>
<button>Show scrolling</button>
<pre id="console">
</pre>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script>
function log() {
var __slice = Array.prototype.slice;
var a = __slice.call(arguments, 0);
var msg = a.join('')
var $console = $("#console");
var t = $console.text();
if (t) {
t += '\n';
}
t += msg;
$console.text(t);
console && console.debug && console.debug(msg);
}
function reset(event){
var scroll = $(".tab-content").scrollLeft();
log('scrolled to ', scroll);
$(".tab-content").scrollLeft(0);
}
$(function($) {$("button").click(reset);});
</script>
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.