From dac5189783f7b082e0baf790c859aae9f28c5412 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Mon, 14 Mar 2016 23:27:08 -0400 Subject: [PATCH] cursor blinks black/white --- editor.coffee | 14 ++++++++++---- editor_tests_compiled.html | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/editor.coffee b/editor.coffee index a5cd8d6..870c61b 100644 --- a/editor.coffee +++ b/editor.coffee @@ -245,14 +245,20 @@ outer_css = (args) -> ret += 'height: 1em;' # FIXME adjust for hight of text ret += 'width: 2px;' ret += 'background: #444;' - ret += '-webkit-animation: blink 1s steps(2, start) infinite;' - ret += 'animation: blink 1s steps(2, start) infinite;' + ret += '-webkit-animation: blink 1s linear infinite;' + ret += 'animation: blink 1s linear infinite;' ret += '}' ret += '@-webkit-keyframes blink {' - ret += 'to { visibility: hidden; }' + ret += '0% { background-color: rgba(0,0,0,0.7); }' + ret += '50% { background-color: rgba(0,0,0,0.7); }' + ret += '50.001% { background-color: rgba(255,255,255,0.7); }' + ret += '100% { background-color: rgba(255,255,255,0.7); }' ret += '}' ret += '@keyframes blink {' - ret += 'to { visibility: hidden; }' + ret += '0% { background-color: rgba(0,0,0,0.7); }' + ret += '50% { background-color: rgba(0,0,0,0.7); }' + ret += '50.001% { background-color: rgba(255,255,255,0.7); }' + ret += '100% { background-color: rgba(255,255,255,0.7); }' ret += '}' ret += '.ann_box {' ret += 'z-index: 5;' diff --git a/editor_tests_compiled.html b/editor_tests_compiled.html index f046002..a9abc11 100644 --- a/editor_tests_compiled.html +++ b/editor_tests_compiled.html @@ -28,9 +28,9 @@ <p> y z <strong>Bold <em> Italic + Bold</strong> Italic </em> Normal</p> <p style="white-space: pre-wrap">this &lt;p&gt; has white-space: pre-wrap</p> -<div> - <div>I'm in a div</div> +<div style="color: black; background: white;"> <div>I'm in a div</div> + <div>I'm in another div</div> <div> <div> &nbsp; -- 1.7.10.4