Commit a35491bf authored by LianaHus's avatar LianaHus

moved bg color from css to div as class

parent 903924b3
...@@ -11,7 +11,6 @@ var css = csjs` ...@@ -11,7 +11,6 @@ var css = csjs`
width:150px; width:150px;
border-radius: 2px; border-radius: 2px;
z-index: 1000; z-index: 1000;
background-color: var(--light)
} }
.liitem .liitem
...@@ -54,11 +53,11 @@ module.exports = (event, items) => { ...@@ -54,11 +53,11 @@ module.exports = (event, items) => {
current.onclick = () => { hide(null, true); items[item]() } current.onclick = () => { hide(null, true); items[item]() }
return current return current
}) })
var container = yo`<div class=${css.container}><ul id='menuitems'>${menu}</ul></div>` var container = yo`<div class="${css.container} bg-ligh"><ul id='menuitems'>${menu}</ul></div>`
container.style.left = event.pageX + 'px' container.style.left = event.pageX + 'px'
container.style.top = event.pageY + 'px' container.style.top = event.pageY + 'px'
container.style.display = 'block' container.style.display = 'block'
document.querySelector('body').appendChild(container) document.querySelector('body').appendChild(container)
setTimeout(() => { setTimeout(() => {
window.addEventListener('click', hide) window.addEventListener('click', hide)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment