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

Refactor op-files-tab styles a bit into less specific BEM selectors

Benjamin Bädorf658f6a9ab6fe
diff --git a/frontend/src/app/spot/styles/sass/components/list.sass b/frontend/src/app/spot/styles/sass/components/list.sass
index 065aa19346d..6a53f665795 100644
--- a/frontend/src/app/spot/styles/sass/components/list.sass
+++ b/frontend/src/app/spot/styles/sass/components/list.sass
@@ -109,3 +109,4 @@
#{$item-list} .spot-list--item-action
padding-left: $spot-spacing-1 + ($i * $spot-spacing-1)
+
diff --git a/frontend/src/global_styles/content/work_packages/tabs/_files.sass b/frontend/src/global_styles/content/work_packages/tabs/_files.sass
index de120b8bfcf..11185c9657e 100644
--- a/frontend/src/global_styles/content/work_packages/tabs/_files.sass
+++ b/frontend/src/global_styles/content/work_packages/tabs/_files.sass
@@ -26,23 +26,37 @@
// See COPYRIGHT and LICENSE files for more details.
//++
-.op-files-tab
+.op-tab-content--tab-section_no-header
+ // Remove any top margin of the top most elements, if the header is not displayed.
+
.op-files-tab--file-upload
- margin-top: $spot-spacing-0-75
+ margin-top: 0
+
+ .op-files-tab--file-list .op-files-tab--file-list-item:first-child
+ margin-top: 0
+
+
- .op-tab-content--tab-section_no-header
- // Remove any top margin of the top most elements, if the header is not displayed.
- .op-files-tab--file-upload
- margin-top: 0
- .op-files-tab--file-list .op-files-tab--file-list-item:first-child
- margin-top: 0
- .op-files-tab--file-list
+
+
+
+
+.op-files-tab
+ &--file-upload
+ margin-top: $spot-spacing-0-75
+
+ &--file-list
margin-bottom: $spot-spacing-0-75
- .op-files-tab--file-list-item
- .op-files-tab--file-list-item-action
+ &-item
+ &_disabled
+ .op-files-tab--file-list-item-action
+ opacity: 0.5
+ pointer-events: none
+
+ &-action
padding-left: 0
padding-right: 0
text-decoration: none
@@ -50,42 +64,38 @@
&.view-not-allowed
opacity: 0.5
- &.disabled
- opacity: 0.5
- pointer-events: none
-
&:hover
.op-files-tab--file-list-item-title
text-decoration: underline
- .op-files-tab--file-list-item-title
- @include spot-body-small
+ &-title
+ @include spot-body-small
- line-height: $spot-spacing-1-5
- word-break: normal
- @include text-shortener
- padding-right: $spot_spacing-0-5
+ line-height: $spot-spacing-1-5
+ word-break: normal
+ @include text-shortener
+ padding-right: $spot_spacing-0-5
- .op-files-tab--file-list-item-text
- @include spot-caption()
+ &-text
+ @include spot-caption()
- color: $spot-color-basic-gray-3
- flex-shrink: 0
+ color: $spot-color-basic-gray-3
+ flex-shrink: 0
- &:not(:last-child)
- margin-right: $spot-spacing-0-5
+ &:not(:last-child)
+ margin-right: $spot-spacing-0-5
- .op-files-tab--file-list-item-avatar
+ &-avatar
display: inline-block
- .op-files-tab--file-list-item-floating-actions
+ &-floating-actions
padding-right: 0
- .op-files-tab--file-list-item-floating-wrapper
+ &-floating-wrapper
&_disabled:hover
background: none
- .op-files-tab--file-list-item-floating-text
+ &-floating-text
@include spot-body-small()
padding-right: $spot-spacing-0-25