_scale () {

    // Eject if no active element is set
    if (!this.activeElement) {
      return;
    }

    this._currentMaxWidth = this.activeElement.getAttribute('data-cssmodal-maxwidth');
    this._currentMaxWidth = parseInt(this._currentMaxWidth, 10);

    if (this._currentMaxWidth) {
      injectStyles(`
        [data-cssmodal-maxwidth] .modal-inner {
          max-width: ${this._currentMaxWidth}px;
          margin-left: -${this._currentMaxWidth / 2}px;
        }

        [data-cssmodal-maxwidth] .modal-close:after {
          margin-right: -${this._currentMaxWidth / 2}px !important;
        }
      `, this.activeElement.id);
    }
  }
Scale the modal according to its custom width