Semantic-ui: Modal size

Created on 13 Oct 2013  路  9Comments  路  Source: Semantic-Org/Semantic-UI

Is there a way to call "small" modal.
Current modal is too large for messages like... "Remove that post?" :)

Enhancement

Most helpful comment

I added support for tiny sizes too in the css - add this to your css file under modal / size - currently around line 30000:

/* Tiny Modal Width */

@media only screen and (max-width: 767px) {
  .ui.tiny.modal {
    width: 95%;
    margin: 0em 0em 0em -47.5%;
  }
}

@media only screen and (min-width: 768px) {
  .ui.tiny.modal {
    width: 50%;
    margin: 0em 0em 0em -25%;
  }
}

@media only screen and (min-width: 992px) {
  .ui.tiny.modal {
    width: 200px;
    margin: 0em 0em 0em -100px;
  }
}

@media only screen and (min-width: 1200px) {
  .ui.tiny.modal {
    width: 300px;
    margin: 0em 0em 0em -150px;
  }
}

@media only screen and (min-width: 1920px) {
  .ui.tiny.modal {
    width: 400px;
    margin: 0em 0em 0em -200px;
  }
}

And you can assign the .tiny class to the modal - useful for prompts and stuff

All 9 comments

edit: moved my comment to a new issue (#241)

It's a good solution with Basic modal. What about Standard?
Thanks.

Yeah, sorry, got a bit distracted. I don't see why modals can't follow the mini-small-large-huge pattern of other elements.

Something like 20%, 40%, 60% (new default), 80%, 100%?

Small and large modals are now available and in docs

Cool! Thanks ;)

I added support for tiny sizes too in the css - add this to your css file under modal / size - currently around line 30000:

/* Tiny Modal Width */

@media only screen and (max-width: 767px) {
  .ui.tiny.modal {
    width: 95%;
    margin: 0em 0em 0em -47.5%;
  }
}

@media only screen and (min-width: 768px) {
  .ui.tiny.modal {
    width: 50%;
    margin: 0em 0em 0em -25%;
  }
}

@media only screen and (min-width: 992px) {
  .ui.tiny.modal {
    width: 200px;
    margin: 0em 0em 0em -100px;
  }
}

@media only screen and (min-width: 1200px) {
  .ui.tiny.modal {
    width: 300px;
    margin: 0em 0em 0em -150px;
  }
}

@media only screen and (min-width: 1920px) {
  .ui.tiny.modal {
    width: 400px;
    margin: 0em 0em 0em -200px;
  }
}

And you can assign the .tiny class to the modal - useful for prompts and stuff

Awesome! Thanks for that @dkzeb!

@dkzeb Awesome! Was just looking to see how to make a smaller one.

@dkzeb Thank you. It's very useful.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

vinhtq picture vinhtq  路  3Comments

deneuxa picture deneuxa  路  3Comments

iPaoo picture iPaoo  路  3Comments

rdzidziguri picture rdzidziguri  路  3Comments