Skip to content

Commit

Permalink
GHI-#7 Implement toggleable cursor blink CSS code variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arcticicestudio committed Mar 9, 2017
1 parent 9b099ba commit 87b6dfb
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ const colors = {
grayscale: foregroundColor
};

let cursorBlinkCSS = `
@keyframes blink {
10%, 50% { opacity: 0 }
60%, 100% { opacity: 1 }
}
.cursor-node[focus=true] {
mix-blend-mode: difference;
}
.cursor-node[focus=true]:not([hyper-blink-moving]) {
box-sizing: content-box !important;
animation: blink 1s ease infinite;
}
`

exports.decorateConfig = config => {
const nordHyper = Object.assign({cursorBlink: true}, config.nordHyper);

Expand All @@ -73,17 +87,7 @@ exports.decorateConfig = config => {
.cursor-node {
border-left-width: 2px;
}
@keyframes blink {
10%, 50% { opacity: 0 }
60%, 100% { opacity: 1 }
}
.cursor-node[focus=true] {
mix-blend-mode: difference;
}
.cursor-node[focus=true]:not([hyper-blink-moving]) {
box-sizing: content-box !important;
animation: blink 1s ease infinite;
}
${nordHyper.cursorBlink ? cursorBlinkCSS : ""}
`,
css: `
${config.css || ""}
Expand Down

0 comments on commit 87b6dfb

Please sign in to comment.