Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

Modal size

Open h2u opened this issue 13 years ago • 9 comments

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

h2u avatar Oct 13 '13 10:10 h2u

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

brigand avatar Oct 13 '13 11:10 brigand

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

h2u avatar Oct 13 '13 11:10 h2u

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%?

brigand avatar Oct 13 '13 11:10 brigand

Small and large modals are now available and in docs

jlukic avatar Oct 15 '13 02:10 jlukic

Cool! Thanks ;)

h2u avatar Oct 15 '13 14:10 h2u

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

dkzeb avatar Feb 18 '16 11:02 dkzeb

Awesome! Thanks for that @dkzeb!

jkrup avatar Feb 22 '16 23:02 jkrup

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

allaboutduncan avatar Mar 04 '16 20:03 allaboutduncan

@dkzeb Thank you. It's very useful.

ufukomer avatar Apr 29 '16 16:04 ufukomer