Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

2.8 KB
Raw Blame
.spot-drop-modal
  display: flex

  &--body
    $border-radius: 5px

    position: absolute
    @include spot-z-index("drop-modal", 1)

    pointer-events: all
    opacity: 1

    box-shadow: var(--shadow-floating-medium)
    background: var(--body-background)
    border-radius: $border-radius

    display: flex
    flex-direction: column

    @media #{$spot-mq-landscape}
      bottom: $spot-spacing-1
      right: $spot-spacing-3_5
      max-height: calc(#{var(--app-height)} - (2 * #{$spot-spacing-1}))
      width: calc(100vw - (#{$spot-spacing-3_5} + #{$spot-spacing-1}))

    @media #{$spot-mq-drop-modal-full-screen}
      position: fixed
      bottom: $spot-spacing-3_5
      // !important is needed here so `@floating-ui/dom` does not overwrite it.
      left: $spot-spacing-1 !important
      top: unset !important
      right: $spot-spacing-1
      width: calc(100vw - (2 * #{$spot-spacing-1}))
      height: calc(#{var(--app-height)} - (#{$spot-spacing-3_5} + #{$spot-spacing-1}))

      &_not-full-screen
        height: auto
        bottom: unset
        top: 50% !important
        transform: translateY(-50%)

    @media #{$spot-mq-drop-modal-in-context}
      position: absolute
      bottom: unset
      left: unset
      right: unset
      width: auto
      height: auto
      max-width: calc(100vw - (2 * #{$spot-spacing-1}))
      max-height: calc(#{var(--app-height)} - (2 * #{$spot-spacing-1}))

    // TODO: At some point, this needs to be a cleverer selector.
    // Though most action bars will probably be at the bottom of a drop-modal,
    // this does not necessarily have to be the case. In that case, this'll look weird.
    > .spot-action-bar,
    > .spot-container > .spot-action-bar
      border-bottom-left-radius: $border-radius
      border-bottom-right-radius: $border-radius

  &_opened::before
    @include spot-z-index("drop-modal", 0)
    display: block
    content: ''
    position: fixed
    top: 0
    bottom: 0
    left: 0
    right: 0
    background: rgba($spot-color-basic-black, 0.5)

    @media #{$spot-mq-drop-modal-in-context}
      display: none

  &--header
    @extend .spot-modal--header
    font-size: var(--body-font-size) !important
    line-height: 1 !important

  &--header-title
    @extend .spot-modal--header-title

  &--header-close-button
    @extend .spot-modal--header-close-button

  &--header-close-button-icon
    @extend .spot-modal--header-close-button-icon

  &--content
    margin: $spot-spacing-1

  &--close-button
    position: absolute
    top: 100%
    margin-top: $spot-spacing-0_75
    left: 50%
    transform: translateX(-50%)
    background-color: $spot-color-basic-white

    @media #{$spot-mq-landscape}
      left: unset
      right: $spot-spacing-0_75
      transform: none

    @media #{$spot-mq-drop-modal-in-context}
      display: none