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

[#43399] Fix tooltips according to spec (#11401)

Andreas Pfohl3c97283662b1
diff --git a/frontend/src/app/spot/styles/sass/components/tooltip.sass b/frontend/src/app/spot/styles/sass/components/tooltip.sass
index 7b03141b847..429b0521e97 100644
--- a/frontend/src/app/spot/styles/sass/components/tooltip.sass
+++ b/frontend/src/app/spot/styles/sass/components/tooltip.sass
@@ -2,154 +2,81 @@
position: relative
display: inline-flex
- $indicator-size: $spot-spacing-0_5
-
&--body
@include spot-z-index("tooltip", 1)
pointer-events: none
opacity: 0
- height: 0
- width: 0
+ width: calc(100% - #{$spot-spacing-2})
+ left: $spot-spacing-1
position: absolute
- min-width: $spot-spacing-10 + $spot-spacing-10
- max-width: 90vw
height: auto
box-shadow: $spot-shadow-light-low
- background: $spot-color-main-light
- color: $spot-color-basic-gray-1
+ background: $spot-color-basic-gray-1
+ color: $spot-color-basic-white
display: flex
flex-direction: column
- &::before
- display: block
- content: ''
- position: absolute
- border: $indicator-size solid transparent
- border-bottom: $indicator-size solid $spot-color-main-light
-
&_left-top
- right: calc(100% + #{$indicator-size})
- top: -$indicator-size
-
- &::before
- right: -2 * $indicator-size
- transform: rotate(90deg)
- top: $indicator-size
+ right: 100%
&_left-center
- right: calc(100% + #{$indicator-size})
+ right: 100%
top: 50%
transform: translateY(-50%)
- &::before
- right: -2 * $indicator-size
- top: 50%
- transform: translateY(-50%) rotate(90deg)
-
&_left-bottom
- right: calc(100% + #{$indicator-size})
- bottom: -$indicator-size
-
- &::before
- right: -2 * $indicator-size
- transform: rotate(90deg)
- bottom: $indicator-size
+ right: 100%
&_bottom-left
- top: calc(100% + #{$indicator-size})
- left: 0%
-
- &::before
- top: -2 * $indicator-size
- left: $indicator-size
+ top: 100%
+ left: $spot-spacing-1
&_bottom-center
- top: calc(100% + #{$indicator-size})
+ top: 100%
left: 50%
transform: translateX(-50%)
- &::before
- top: -2 * $indicator-size
- left: 50%
- transform: translateX(-50%)
-
&_bottom-right
- top: calc(100% + #{$indicator-size})
- right: 0%
-
- &::before
- top: -2 * $indicator-size
- right: $indicator-size
+ top: 100%
+ right: $spot-spacing-1
&_right-top
- left: calc(100% + #{$indicator-size})
- top: -$indicator-size
-
- &::before
- left: -2 * $indicator-size
- transform: rotate(-90deg)
- top: $indicator-size
+ left: 100%
&_right-center
- left: calc(100% + #{$indicator-size})
+ left: 100%
top: 50%
transform: translateY(-50%)
- &::before
- left: -2 * $indicator-size
- top: 50%
- transform: translateY(-50%) rotate(-90deg)
-
&_right-bottom
- left: calc(100% + #{$indicator-size})
- bottom: -$indicator-size
-
- &::before
- left: -2 * $indicator-size
- transform: rotate(-90deg)
- bottom: $indicator-size
+ left: 100%
&_top-left
- bottom: calc(100% + #{$indicator-size})
- left: 0%
-
- &::before
- bottom: -2 * $indicator-size
- left: $indicator-size
- transform: rotate(180deg)
+ bottom: 100%
+ left: $spot-spacing-1
&_top-center
- bottom: calc(100% + #{$indicator-size})
+ bottom: 100%
left: 50%
transform: translateX(-50%)
- &::before
- bottom: -2 * $indicator-size
- left: 50%
- transform: translateX(-50%) rotate(180deg)
-
&_top-right
- bottom: calc(100% + #{$indicator-size})
- right: 0%
+ bottom: 100%
+ right: $spot-spacing-1
+
+ .spot-body-small
+ &:first-child
+ margin-top: $spot-spacing-0-5
- &::before
- bottom: -2 * $indicator-size
- right: $indicator-size
- transform: rotate(180deg)
+ &:last-child
+ margin-bottom: $spot-spacing-0-5
&:hover &--body
- pointer-events: all
opacity: 1
- height: auto
- width: auto
-
- &_dark &--body
- color: $spot-color-basic-white
- background: $spot-color-basic-gray-1
-
- &::before
- border-bottom-color: $spot-color-basic-gray-1
+ &_light &--body
+ color: $spot-color-basic-gray-1
+ background: $spot-color-main-light