Skip to content

Commit

Permalink
Dynamic padding bottom for content. Fix robinparisi#125
Browse files Browse the repository at this point in the history
  • Loading branch information
robinparisi committed Mar 14, 2021
1 parent 6e93c1b commit 9eadca7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/tingle.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* tingle.js - A simple modal plugin written in pure JavaScript
* @version v0.15.3
* @version v0.16.0
* @link https://github.com/robinparisi/tingle#readme
* @license MIT
*/
Expand Down
6 changes: 2 additions & 4 deletions dist/tingle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* tingle.js - A simple modal plugin written in pure JavaScript
* @version v0.15.3
* @version v0.16.0
* @link https://github.com/robinparisi/tingle#readme
* @license MIT
*/
Expand Down Expand Up @@ -222,8 +222,8 @@
this.modal.appendChild(this.modalBoxFooter)
this.modalBoxFooter.classList.add('tingle-modal-box__footer--sticky')
_recalculateFooterPosition.call(this)
this.modalBoxContent.style['padding-bottom'] = this.modalBoxFooter.clientHeight + 20 + 'px'
}
this.modalBoxContent.style['padding-bottom'] = this.modalBoxFooter.clientHeight + 20 + 'px'
} else if (this.modalBoxFooter) {
if (!this.modalBox.contains(this.modalBoxFooter)) {
this.modal.removeChild(this.modalBoxFooter)
Expand Down Expand Up @@ -280,8 +280,6 @@
this.modal.classList.remove('tingle-modal--overflow')
}

// tODO: remove offset
// _offset.call(this);
if (!this.isOverflow() && this.opts.stickyFooter) {
this.setStickyFooter(false)
} else if (this.isOverflow() && this.opts.stickyFooter) {
Expand Down
2 changes: 1 addition & 1 deletion dist/tingle.min.js

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

11 changes: 7 additions & 4 deletions doc/tingle/tingle.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/* ----------------------------------------------------------- */
/* == tingle v0.15.2 */
/* ----------------------------------------------------------- */

/**
* tingle.js - A simple modal plugin written in pure JavaScript
* @version v0.16.0
* @link https://github.com/robinparisi/tingle#readme
* @license MIT
*/

.tingle-modal * {
box-sizing: border-box;
}
Expand Down
20 changes: 9 additions & 11 deletions doc/tingle/tingle.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* !
* tingle.js
* @author robin_parisi
* @version 0.15.2
* @url
*/

/* global define,module */
/**
* tingle.js - A simple modal plugin written in pure JavaScript
* @version v0.16.0
* @link https://github.com/robinparisi/tingle#readme
* @license MIT
*/
/* global define, module */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory)
Expand Down Expand Up @@ -222,8 +222,8 @@
this.modal.appendChild(this.modalBoxFooter)
this.modalBoxFooter.classList.add('tingle-modal-box__footer--sticky')
_recalculateFooterPosition.call(this)
this.modalBoxContent.style['padding-bottom'] = this.modalBoxFooter.clientHeight + 20 + 'px'
}
this.modalBoxContent.style['padding-bottom'] = this.modalBoxFooter.clientHeight + 20 + 'px'
} else if (this.modalBoxFooter) {
if (!this.modalBox.contains(this.modalBoxFooter)) {
this.modal.removeChild(this.modalBoxFooter)
Expand Down Expand Up @@ -280,8 +280,6 @@
this.modal.classList.remove('tingle-modal--overflow')
}

// tODO: remove offset
// _offset.call(this);
if (!this.isOverflow() && this.opts.stickyFooter) {
this.setStickyFooter(false)
} else if (this.isOverflow() && this.opts.stickyFooter) {
Expand Down
Loading

0 comments on commit 9eadca7

Please sign in to comment.