Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions flippant.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@ function flip(flipper, content, type, class_name, timeout) {
}

function set_styles(back, front, position) {
back.style.position = position
back.style.top = front.offsetTop + "px"
back.style.left = front.offsetLeft + "px"
back.style['min-height'] = front.offsetHeight + "px"
back.style.width = front.offsetWidth + "px"
back.style["z-index"] = 9999
back.style.setProperty('position', position)
back.style.setProperty('top', front.offsetTop + "px")
back.style.setProperty('left', front.offsetLeft + "px")
back.style.setProperty('min-height', front.offsetHeight + "px")
back.style.setProperty('width', front.offsetWidth + "px")
back.style.setProperty('z-index', 9999)
}

function null_styles(back) {
back.style.top = null
back.style.left = null
back.style.height = null
back.style.width = null
back.style.removeProperty('top')
back.style.removeProperty('left')
back.style.removeProperty('height')
back.style.removeProperty('width')
}

function card_styles(back) {
back.style.height = 'auto'
back.style.setProperty('height', 'auto')
}
},{}]},{},[1])(1)
});
Expand Down
2 changes: 1 addition & 1 deletion flippant.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions lib/flip.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ function flip(flipper, content, type, class_name, timeout) {
}

function set_styles(back, front, position) {
back.style.position = position
back.style.top = front.offsetTop + "px"
back.style.left = front.offsetLeft + "px"
back.style['min-height'] = front.offsetHeight + "px"
back.style.width = front.offsetWidth + "px"
back.style["z-index"] = 9999
back.style.setProperty('position', position)
back.style.setProperty('top', front.offsetTop + "px")
back.style.setProperty('left', front.offsetLeft + "px")
back.style.setProperty('min-height', front.offsetHeight + "px")
back.style.setProperty('width', front.offsetWidth + "px")
back.style.setProperty('z-index', 9999)
}

function null_styles(back) {
back.style.top = null
back.style.left = null
back.style.height = null
back.style.width = null
back.style.removeProperty('top')
back.style.removeProperty('left')
back.style.removeProperty('height')
back.style.removeProperty('width')
}

function card_styles(back) {
back.style.height = 'auto'
back.style.setProperty('height', 'auto')
}