From: Jason Woofenden Date: Tue, 15 Mar 2016 03:49:57 +0000 (-0400) Subject: (strange) cursor: always visible on anything X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=commitdiff_plain;h=c951e0ff067bf026175ccd32890642dd05416602 (strange) cursor: always visible on anything --- diff --git a/editor.coffee b/editor.coffee index 870c61b..cbbe9c3 100644 --- a/editor.coffee +++ b/editor.coffee @@ -242,23 +242,19 @@ outer_css = (args) -> ret += '}' ret += '#cursor {' ret += 'position: absolute;' - ret += 'height: 1em;' # FIXME adjust for hight of text ret += 'width: 2px;' - ret += 'background: #444;' - ret += '-webkit-animation: blink 1s linear infinite;' - ret += 'animation: blink 1s linear infinite;' + ret += 'background: linear-gradient(0deg, rgba(0,0,0,1), rgba(255,255,255,1), rgba(0,0,0,1), rgba(255,255,255,1), rgba(0,0,0,1), rgba(255,255,255,1), rgba(0,0,0,1), rgba(255,255,255,1), rgba(0,0,0,1));' + ret += 'background-size: 200% 200%;' + ret += '-webkit-animation: blink 1s linear normal infinite;' + ret += 'animation: blink 1s linear normal infinite;' ret += '}' ret += '@-webkit-keyframes blink {' - 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 += '0%{background-position:0% 0%}' + ret += '100%{background-position:0% -100%}' ret += '}' - ret += '@keyframes blink {' - 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 += '@keyframes blink { ' + ret += '0%{background-position:0% 0%}' + ret += '100%{background-position:0% -100%}' ret += '}' ret += '.ann_box {' ret += 'z-index: 5;'