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

5.4 KB
Raw Blame
//-- copyright
// OpenProject is an open source project management software.
// Copyright (C) the OpenProject GmbH
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//
// See COPYRIGHT and LICENSE files for more details.
//++

/***** Auto-complete ****/

div.autocomplete
  position: absolute
  width: 400px
  margin: 0
  padding: 0
  z-index: 500
  ul
    list-style-type: none
    margin: 0
    padding: 0
    li
      list-style-type: none
      display: block
      margin: -1px 0 0 0
      padding: 2px
      cursor: pointer
      font-size: 90%
      border: 1px solid var(--borderColor-default)
      border-left: 1px solid var(--borderColor-default)
      border-right: 1px solid var(--borderColor-default)
      background-color: white
      &.selected
        background-color: #ffb
      span.informal
        font-size: 80%
        color: #aaa

#parent_issue_candidates ul li, #related_issue_candidates ul li
  width: 500px

// -------------------------- ng-select --------------------------
.ng-select
  width: 100%
  font-size: var(--body-font-size)

  &.-error
    .ng-select-container
      border-color: var(--content-form-error-color)

  &.ng-select-disabled
    .ng-select-container,
    .ng-select-container .ng-value-container input
      background-color: var(--control-bgColor-disabled) !important
      border-color: var(--control-borderColor-disabled) !important
      box-shadow: none !important
      color: var(--control-fgColor-disabled) !important
      cursor: not-allowed !important
      opacity: 1
      -webkit-text-fill-color: var(--control-fgColor-disabled)

    &.ng-select-searchable .ng-select-container .ng-value-container .ng-input
      opacity: 0

  .ng-value-container
    min-height: 2rem
    width: calc(100% - 30px)

    // Override OPs default padding for inputs which looks strange in the autocompleter
    input
      padding-left: 0px

  .ng-select-container
    border-radius: 2px
    z-index: auto !important
    height: 30px !important
    min-height: 30px !important
    border-color: var(--borderColor-default) !important

    .ng-value-container
      overflow: visible !important

      .ng-placeholder
        top: 1px !important
        color: var(--fgColor-muted)
        @include text-shortener

      input
        height: 100%
        padding: 0
        -webkit-box-sizing: border-box !important
        -moz-box-sizing: border-box !important
        box-sizing: border-box !important
        color: var(--body-font-color) !important

  .ng-value
    @include text-shortener
    line-height: 22px

// Override some basic styles to ensure that ngSelect matches the current theme
.ng-select-container,
.ng-optgroup:not(.ng-option-marked, .ng-option-disabled),
.ng-option:not(.ng-option-marked, .ng-option-disabled),
.ng-dropdown-panel,
.ng-dropdown-panel-items,
.ng-dropdown-footer
  background-color: var(--body-background) !important
  color: var(--body-font-color) !important
  border-color: var(--borderColor-default) !important

.ng-select .ng-arrow-wrapper .ng-arrow
  border-color: var(--fgColor-muted) transparent transparent

.ng-select.ng-select-opened>.ng-select-container .ng-arrow
  border-color: transparent transparent var(--fgColor-muted)

.ng-select .ng-clear-wrapper
  color: var(--fgColor-muted)

.ng-select.ng-select-multiple .ng-select-container
  height: initial !important
  min-height: initial !important

  .ng-value-label
    display: initial !important

  .ng-placeholder
    // Fix overflow by providing a max width to the input
    //
    // We subtract the width and right padding of the dropdown arrow
    max-width: calc(100% - 25px - 5px)

// Ensure dropdown is above modals
.ng-dropdown-panel
  z-index: 9500 !important

  // Overrides for the ng-footer-tmp option
  .ng-footer-text
    font-size: 0.9rem
    padding: 5px
    font-style: italic

.ng-option-label
  vertical-align: top

.ng-option, .ng-optgroup
  line-height: 22px
  font-size: var(--body-font-size)

  .op-avatar
    margin-right: 8px

  &.ng-option-marked
    background-color: var(--control-transparent-bgColor-hover) !important
    border-color: var(--list-item-hover--border-color) !important
    color: var(--list-item-hover--color) !important

  &.ng-option-disabled
    background-color: var(--bgColor-disabled) !important
    border-color: var(--borderColor-disabled) !important
    color: var(--fgColor-disabled) !important

.ng-dropdown-footer
  padding: 0 !important

.ng-placeholder
  line-height: 2rem

.work-package-table--container .ng-dropdown-panel
  z-index: auto !important