Fix dismiss button scrolling off the top of overlays.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 7 Sep 2014 17:33:08 +0000 (19:33 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 7 Sep 2014 17:33:08 +0000 (19:33 +0200)
Adjust padding on overlays so the content can't overlap the dismiss
button.

BUGS.org
src/yuu/data/yuu.css

index b480842..b754638 100644 (file)
--- a/BUGS.org
+++ b/BUGS.org
@@ -3,8 +3,10 @@
    This moves the Windows version of Chromium several steps forward,
    and fixes the stall that prevented the 0.10.x series from working
    properly on Windows before.
+** DONE Close buttons don't scroll off the top of the dialog
+   Actually, they still do in most browsers, but as position: sticky
+   support rolls out, they will work correctly.
 
 * Pending
-** TODO Close buttons should be position:fixed
 ** TODO Detect WebGL failure on Windows and offer DX redistributable
 ** TODO Fix version number in OS X About dialog
index b572735..37eb3fd 100644 (file)
@@ -188,7 +188,7 @@ pre#yuu-licensing {
     left: 50%;
     max-height: 80%;
     overflow: auto;
-    padding: 0 1em 1em 1em;
+    padding: 0 2em 1em 2em;
     position: fixed;
     transform: translate(-50%, 10vh) scale(1, 1);
     -webkit-transform: translate(-50%, 10vh) scale(1, 1);
@@ -229,8 +229,9 @@ div[data-yuu-command=dismiss] {
     width: 1.25em;
     height: 1.25em;
     text-align: center;
-    position: fixed;
-    margin-left: -0.6667em;
+    margin-left: -1.3333em;
+    position: sticky;
+    top: 0;
 }
 
 div[data-yuu-command=dismiss]:after {