Skip to content

Instantly share code, notes, and snippets.

@kendru
Created July 9, 2019 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kendru/fad0005b322dea5db946abefa1c6a1b2 to your computer and use it in GitHub Desktop.
Save kendru/fad0005b322dea5db946abefa1c6a1b2 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/sefixaf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.editor {
position: absolute;
min-height: 100%;
min-width: 100%;
background-color: #002b36;
font-family: monospace;
color: #eee8d5;
}
.gutter-left {
position: absolute;
height: 100%;
width: 40px;
border-right: 1px solid #fdf6e3;
text-align: right;
background-color: #586e75;
}
.line {
padding-left: 10px;
padding-right: 10px;
}
.line.current {
background: #002b36;
}
.content {
position: absolute;
left: 40px;
padding-left: 8px;
}
.cursor {
background: #586e75;
-webkit-animation: blink 1.5s step-end infinite;
animation: blink 1.5s step-end infinite;
}
.kw {
font-weight: bold;
}
.ident {
color: #268bd2;
}
.op {
color: #cb4b16;
}
.num {
color: #859900;
}
-webkit-animation: blink 1s step-end infinite;
animation: blink 1s step-end infinite;
}
@-webkit-keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
@keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
</style>
</head>
<body>
<div class="editor">
<div class="gutter-left">
<div class="lines">
<div class="line">1</div>
<div class="line">2</div>
<div class="line current">3</div>
<div class="line">4</div>
<div class="line">5</div>
<div class="line">6</div>
<div class="line">7</div>
<div class="line">8</div>
<div class="line">9</div>
<div class="line">10</div>
</div>
</div>
<div class="content" contenteditable>
<div><span class="kw">SELECT</span> <span class="ident">user</span><span class="punc period">.</span><span class="ident">first_name</span></div>
<div><span class="kw">FROM</span> <span class="ident">user</span></div>
<div><span class="kw">WHERE</span> <span class="ident">age</span> <span class="op gt">&gt;</span><span class="cursor"> </span><span class="num">21</span><span class="punc semicolon">;</span></div>
</div>
</div>
<script id="jsbin-source-css" type="text/css">.editor {
position: absolute;
min-height: 100%;
min-width: 100%;
background-color: #002b36;
font-family: monospace;
color: #eee8d5;
}
.gutter-left {
position: absolute;
height: 100%;
width: 40px;
border-right: 1px solid #fdf6e3;
text-align: right;
background-color: #586e75;
}
.line {
padding-left: 10px;
padding-right: 10px;
}
.line.current {
background: #002b36;
}
.content {
position: absolute;
left: 40px;
padding-left: 8px;
}
.cursor {
background: #586e75;
-webkit-animation: blink 1.5s step-end infinite;
animation: blink 1.5s step-end infinite;
}
.kw {
font-weight: bold;
}
.ident {
color: #268bd2;
}
.op {
color: #cb4b16;
}
.num {
color: #859900;
}
-webkit-animation: blink 1s step-end infinite;
animation: blink 1s step-end infinite;
}
@-webkit-keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
@keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}</script>
</body>
</html>
.editor {
position: absolute;
min-height: 100%;
min-width: 100%;
background-color: #002b36;
font-family: monospace;
color: #eee8d5;
}
.gutter-left {
position: absolute;
height: 100%;
width: 40px;
border-right: 1px solid #fdf6e3;
text-align: right;
background-color: #586e75;
}
.line {
padding-left: 10px;
padding-right: 10px;
}
.line.current {
background: #002b36;
}
.content {
position: absolute;
left: 40px;
padding-left: 8px;
}
.cursor {
background: #586e75;
-webkit-animation: blink 1.5s step-end infinite;
animation: blink 1.5s step-end infinite;
}
.kw {
font-weight: bold;
}
.ident {
color: #268bd2;
}
.op {
color: #cb4b16;
}
.num {
color: #859900;
}
-webkit-animation: blink 1s step-end infinite;
animation: blink 1s step-end infinite;
}
@-webkit-keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
@keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment