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

variable for text-shortener

ulferts62919379d512
diff --git a/app/assets/stylesheets/content/_attributes_key_value.sass b/app/assets/stylesheets/content/_attributes_key_value.sass
index caa3f06fa98..82fa8b0f3ca 100644
--- a/app/assets/stylesheets/content/_attributes_key_value.sass
+++ b/app/assets/stylesheets/content/_attributes_key_value.sass
@@ -94,5 +94,4 @@
.attributes-map--value
// empty for now but it makes sense to also have it present in the style declaration IMO
zoom: 1
- @include text-shortener
- white-space: normal
+ @include text-shortener(false)
diff --git a/app/assets/stylesheets/content/_calendars.sass b/app/assets/stylesheets/content/_calendars.sass
index 51c24316e3e..7cda0e0f0a7 100644
--- a/app/assets/stylesheets/content/_calendars.sass
+++ b/app/assets/stylesheets/content/_calendars.sass
@@ -23,8 +23,7 @@ full-calendar
.fc-title
max-width: 100%
- overflow: hidden
- text-overflow: ellipsis
+ @include text-shortener(false)
.fc-header-toolbar
h2
diff --git a/app/assets/stylesheets/content/_types_form_configuration.sass b/app/assets/stylesheets/content/_types_form_configuration.sass
index 553dc57120e..526c5fbb7bb 100644
--- a/app/assets/stylesheets/content/_types_form_configuration.sass
+++ b/app/assets/stylesheets/content/_types_form_configuration.sass
@@ -94,8 +94,7 @@
.attribute-name,
.group-name
flex-basis: 90%
- @include text-shortener
- white-space: normal
+ @include text-shortener(false)
// Query group styles
diff --git a/app/assets/stylesheets/content/work_packages/inplace_editing/_display_fields.sass b/app/assets/stylesheets/content/work_packages/inplace_editing/_display_fields.sass
index 882a478f3c7..0b18ef97f13 100644
--- a/app/assets/stylesheets/content/work_packages/inplace_editing/_display_fields.sass
+++ b/app/assets/stylesheets/content/work_packages/inplace_editing/_display_fields.sass
@@ -43,8 +43,7 @@
.inline-edit--display-field
display: inline-block
max-width: 100%
- @include text-shortener
- white-space: inherit
+ @include text-shortener(false)
&.-placeholder
font-style: italic
@@ -52,8 +51,7 @@
// Always render custom options as inline
// when only one line
.custom-option
- @include text-shortener
- white-space: normal
+ @include text-shortener(false)
&:not(.-multiple-lines)
display: inline
diff --git a/app/assets/stylesheets/openproject/_mixins.sass b/app/assets/stylesheets/openproject/_mixins.sass
index a0c1a8ef3a4..d0cec8307a7 100644
--- a/app/assets/stylesheets/openproject/_mixins.sass
+++ b/app/assets/stylesheets/openproject/_mixins.sass
@@ -43,12 +43,14 @@
height: 0
clear: both
-@mixin text-shortener
- white-space: nowrap
+@mixin text-shortener($oneline: true)
overflow: hidden
text-overflow: ellipsis
-o-text-overflow: ellipsis
-ms-text-overflow: ellipsis
+ @if $oneline
+ white-space: nowrap
+
@mixin allow-vertical-scrolling
overflow-x: hidden
diff --git a/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.sass b/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.sass
index be1810e9f5d..ac1faea14e5 100644
--- a/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.sass
+++ b/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.sass
@@ -2,13 +2,12 @@
.wp-status-button
.button
- @include text-shortener
+ @include text-shortener(false)
padding: 5px
margin-bottom: 0
background-color: var(--status-selector-bg-color)
border: none
color: white
- white-space: nowrap
max-width: 100%
.button--text
diff --git a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass
index 94a58a8c6dd..481010c6b65 100644
--- a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass
+++ b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass
@@ -45,8 +45,7 @@
grid-area: type
.wp-card--subject
grid-area: subject
- @include text-shortener
- white-space: normal
+ @include text-shortener(false)
.wp-card--assignee
grid-area: avatar
place-self: center left