Skip to content

Instantly share code, notes, and snippets.

@clevernyyyy
Created November 18, 2016 05:23
Show Gist options
  • Save clevernyyyy/ca9eeae564944051d23c3a40e3564c22 to your computer and use it in GitHub Desktop.
Save clevernyyyy/ca9eeae564944051d23c3a40e3564c22 to your computer and use it in GitHub Desktop.

/ember/node_modules/ember-modal-dialog/addon/components/positioned-container.js

  alignCenter: function() {
    //const elementWidth = this.$().outerWidth();
    //const elementHeight = this.$().outerHeight();

    // this.$().css('left', '50%')
    //   .css('top', '50%')
    //   .css('margin-left', elementWidth * -0.5)
    //   .css('margin-top', elementHeight * -0.5);

    this.$().css('top', '50%')
      .css('max-width', '60$')
      .css('position', 'relative')
      .css('margin', '0 auto')
      .css('word-break', 'break-all')
      .css('transform', 'translateY(-50%)');
  },

/ember/app/styles/extra.scss

  /* style for login modal */
  .login-box-margin {
    margin:0px;
  }
  .login-title {
    text-align: center;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: .05em;
  }
  .login-modal {
    max-width: 40%;
  }
  /* style for challenges modal */
  .challenge-style-modal-container {
    max-height: 80%; 
    overflow: scroll; 
  }

/ember/app/templates/components/login-modal.hbs

{{#modal-dialog translucentOverlay=true containerClassNames='login-modal'}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment