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.7 KB
Raw Blame
// Based on spinkit by Tobias Ahlin.
//
// The MIT License (MIT)
// Copyright (c) 2015 Tobias Ahlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@keyframes rotate-milestone
  0%
    rotate: 45deg
    transform: scale(100%)
  50%
    transform: scale(130%)
  60%
    rotate: 1080deg
    transform: scale(110%)
  100%
    rotate: 945deg

@keyframes rotate-linestone
  0%
    rotate: 45deg
    transform: scale(50%)
  35%
    transform: scale(50%)
    border-width: 4px
    border-radius: 10px
  60%
    rotate: 1080deg
    transform: scale(160%)
    border-width: 0
  100%
    rotate: 945deg
    border-width: 0
    border-radius: 10px


$loading-indicator-bg-color: var(--body-background)
$loading-indicator-width: 150px
$loading-indicator-height: 80px

.loading-indicator--background
  @include overlay-background
  background: $loading-indicator-bg-color
  opacity: 0.8

// Ensure loading indicator is rendered correctly in each location
.loading-indicator--location
  position: relative

.op-loading-indicator
  background-color: transparent
  width: $loading-indicator-width
  height: $loading-indicator-height
  overflow: hidden
  position: relative
  margin: 0
  left: calc(50% - ($loading-indicator-width / 2))
  top: 33%

  div
    &:nth-of-type(1)
      border: solid 4px #a3eea8
      background-color: transparent
      width: 32px
      height: 32px
      border-radius: 5px
      position: absolute
      top: 24px
      left: 60px
      animation: rotate-linestone 4s ease-in-out infinite

    &:nth-of-type(2)
      background-color: #35C53F
      width: 32px
      height: 32px
      border-radius: 5px
      position: absolute
      top: 24px
      left: 60px
      animation: rotate-milestone 4s ease-in-out infinite

  &_embedded
    top: 0
    left: 0