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

Update spot-list hover color and compact spacings

Benjamin Bädorf37da1eab41c8
diff --git a/frontend/src/app/spot/spot-docs.component.html b/frontend/src/app/spot/spot-docs.component.html
index 93da1e4c408..785410efcc9 100644
--- a/frontend/src/app/spot/spot-docs.component.html
+++ b/frontend/src/app/spot/spot-docs.component.html
@@ -115,6 +115,8 @@ Currently selected value is {{ toggleValue }}
<h1>Lists</h1>
+<h2>Normal list</h2>
+
<ul class="spot-list">
<li class="spot-list--item">
<label class="spot-list--item-action">
@@ -161,6 +163,54 @@ Currently selected value is {{ toggleValue }}
</li>
</ul>
+<h2>Compact list</h2>
+
+<ul class="spot-list spot-list_compact">
+ <li class="spot-list--item">
+ <label class="spot-list--item-action">
+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>
+ <div class="spot-list--item-title">Checkbox item</div>
+ </label>
+ </li>
+ <li class="spot-list--item">
+ <label class="spot-list--item-action">
+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>
+ <div class="spot-list--item-title">Checkbox item with children</div>
+ </label>
+ <ul class="spot-list spot-list_compact">
+ <li class="spot-list--item">
+ <label class="spot-list--item-action">
+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>
+ <div class="spot-list--item-title">Child checkbox item</div>
+ </label>
+ <ul class="spot-list spot-list_compact">
+ <li class="spot-list--item">
+ <label class="spot-list--item-action">
+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>
+ <div class="spot-list--item-title">Secon level child</div>
+ </label>
+ </li>
+ </ul>
+ </li>
+ <li class="spot-list--item">
+ <label class="spot-list--item-action">
+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>
+ <div class="spot-list--item-title">Second child checkbox item</div>
+ </label>
+ </li>
+ <li class="spot-list--item">
+ <label class="spot-list--item-action spot-list--item-action_disabled">
+ <spot-checkbox
+ [(ngModel)]="listCheckboxValue"
+ [disabled]="true"
+ ></spot-checkbox>
+ <div class="spot-list--item-title">Disabled item</div>
+ </label>
+ </li>
+ </ul>
+ </li>
+</ul>
+
<h1>Filter Chip</h1>
<section class="space-children">
diff --git a/frontend/src/app/spot/styles/sass/components/list.sass b/frontend/src/app/spot/styles/sass/components/list.sass
index a0e55f405c8..0ae9da5b97c 100644
--- a/frontend/src/app/spot/styles/sass/components/list.sass
+++ b/frontend/src/app/spot/styles/sass/components/list.sass
@@ -23,7 +23,7 @@
cursor: pointer
&:hover
- background-color: $spot-color-main-light
+ background-color: $spot-color-basic-gray-6
&_disabled
color: $spot-color-basic-gray-3
@@ -37,7 +37,10 @@
&:not(:last-child)
margin-left: $spot-spacing-0_5
- &_compact &--item
+ &_compact &--item:not(:first-child)
+ margin-top: $spot-spacing-0_25
+
+ &--item > &_compact > &--item:first-child
margin-top: $spot-spacing-0_25
&_compact &--item-action