You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

modal.css 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .ui.modal.g-modal-confirm {
  2. max-width: min(800px, 90vw);
  3. width: fit-content;
  4. }
  5. .ui.modal.g-modal-confirm > .inside.close.icon {
  6. padding: 0;
  7. width: 1em;
  8. height: 1em;
  9. top: 1.2em;
  10. }
  11. .ui.modal > .close.inside {
  12. color: inherit;
  13. }
  14. .ui.modal > .close.icon[height="16"] {
  15. top: 0.7em; /* fomantic uses absolute layout, so if we have special icon size, it needs this trick to align vertically */
  16. color: var(--color-text-dark);
  17. }
  18. .ui.modal > .header {
  19. /* can't use display:flex, because some headers have space-separated elements, eg: delete branch modal */
  20. color: var(--color-text-dark);
  21. background: var(--color-body);
  22. border-color: var(--color-secondary);
  23. border-top-left-radius: var(--border-radius);
  24. border-top-right-radius: var(--border-radius);
  25. vertical-align: middle;
  26. }
  27. .ui.modal > .header .svg {
  28. vertical-align: middle;
  29. display: inline-block;
  30. }
  31. .ui.modal {
  32. background: var(--color-body);
  33. box-shadow: 1px 3px 3px 0 var(--color-shadow), 1px 3px 15px 2px var(--color-shadow);
  34. }
  35. /* Gitea sometimes use a form in a modal dialog, then the "positive" button could submit the form directly
  36. Fomantic UI only supports the layout: <div .modal><div .content/><div .actions/></div>
  37. However, Gitea uses the following layouts:
  38. * <div .modal><div .content><div .actions/></div></div>
  39. * <div .modal><form><div .content/><div .actions/></form></div>
  40. * <div .modal><div .content><form><div .actions/></form></div></div>
  41. * <div .modal><div .content></div><form><div .actions/></form></div>
  42. * ...
  43. These inconsistent layouts should be refactored to simple ones.
  44. */
  45. .ui.modal > .content,
  46. .ui.modal form > .content {
  47. padding: 1.5em;
  48. background: var(--color-body);
  49. }
  50. .ui.modal > .actions,
  51. .ui.modal .content + .actions,
  52. .ui.modal .content + form > .actions {
  53. background: var(--color-secondary-bg);
  54. border-color: var(--color-secondary);
  55. padding: 1rem;
  56. text-align: right;
  57. }
  58. .ui.modal .content > .actions {
  59. padding-top: 1em; /* if the "actions" is in the "content", some paddings are already added by the "content" */
  60. text-align: right;
  61. }
  62. /* positive/negative action buttons */
  63. .ui.modal .actions > .ui.button {
  64. display: inline-flex;
  65. align-items: center;
  66. padding: 10px 12px 10px 10px;
  67. margin-right: 0;
  68. }
  69. .ui.modal .actions > .ui.button.danger {
  70. display: block;
  71. width: 100%;
  72. margin: 0 auto;
  73. text-align: center;
  74. }
  75. .ui.modal .actions > .ui.button .svg {
  76. margin-right: 5px;
  77. }