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

Style shadowElements in boards like on the project overview page

Henriette Dinger09cfde124a8a
diff --git a/app/assets/stylesheets/content/drag_and_drop.sass b/app/assets/stylesheets/content/drag_and_drop.sass
index 787659151e1..45173f68834 100644
--- a/app/assets/stylesheets/content/drag_and_drop.sass
+++ b/app/assets/stylesheets/content/drag_and_drop.sass
@@ -31,8 +31,10 @@
// there is also the 'modifying' grouping, which could serve as the basis for the two.
@mixin modifying--placeholder
- border: 1px dashed $primary-color
+ border: 1px dashed var(--primary-color)
pointer-events: none
+ *
+ visibility: hidden
@mixin d_n_d--preview
box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1)
diff --git a/frontend/src/app/components/wp-card-view/styles/wp-card-view.component.sass b/frontend/src/app/components/wp-card-view/styles/wp-card-view.component.sass
index 5628ea04dc7..22553908ab6 100644
--- a/frontend/src/app/components/wp-card-view/styles/wp-card-view.component.sass
+++ b/frontend/src/app/components/wp-card-view/styles/wp-card-view.component.sass
@@ -5,3 +5,4 @@
.wp-inline-create--reference-container
margin-bottom: 3rem
+ margin-top: 10px
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 481010c6b65..2e950c5fac8 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
@@ -30,7 +30,11 @@
margin-top: 10px
// Take care that the shadow of the last element is still visible
&:last-of-type
- margin-bottom: 3px
+ margin-bottom: 5px
+
+ // Style shadow element while dragging
+ wp-single-card:host.gu-transit &
+ @include modifying--placeholder
.wp-card--content:not(.-new)
display: grid
diff --git a/frontend/src/app/modules/boards/board/board.component.sass b/frontend/src/app/modules/boards/board/board.component.sass
index d6b07e98dae..d7672adff66 100644
--- a/frontend/src/app/modules/boards/board/board.component.sass
+++ b/frontend/src/app/modules/boards/board/board.component.sass
@@ -17,7 +17,6 @@ $board-list-max-width: 300px
flex-grow: 1
// Make it scrollable
- padding-bottom: 5px
overflow-y: auto
@@ -29,6 +28,9 @@ $board-list-max-width: 300px
&:first-of-type
margin-left: 5px
+ &.cdk-drag-placeholder
+ @include modifying--placeholder
+
.board--header-container
display: flex
align-items: flex-start
diff --git a/frontend/src/assets/sass/_helpers.sass b/frontend/src/assets/sass/_helpers.sass
index d7378a2d07c..d5704754c48 100644
--- a/frontend/src/assets/sass/_helpers.sass
+++ b/frontend/src/assets/sass/_helpers.sass
@@ -1 +1,2 @@
@import "../../../../app/assets/stylesheets/openproject/_mixins"
+@import "../../../../app/assets/stylesheets/content/drag_and_drop"