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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add compact version of spot-list (#10748)
Benjamin Bädorff1b336724ac5
diff --git a/frontend/src/app/spot/spot-docs.component.html b/frontend/src/app/spot/spot-docs.component.htmlindex 3786a100a3c..cf91e18f19a 100644--- a/frontend/src/app/spot/spot-docs.component.html+++ b/frontend/src/app/spot/spot-docs.component.html@@ -123,6 +123,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">@@ -169,6 +171,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.sassindex 9539d004100..0ae9da5b97c 100644--- a/frontend/src/app/spot/styles/sass/components/list.sass+++ b/frontend/src/app/spot/styles/sass/components/list.sass@@ -16,14 +16,14 @@display: flexalign-items: centerjustify-content: flex-start- padding: $spot-spacing-0_5+ padding: $spot-spacing-0_5 $spot-spacing-1background-color: transparentmargin: 0border: 0cursor: pointer&:hover- background-color: $spot-color-main-light+ background-color: $spot-color-basic-gray-6&_disabledcolor: $spot-color-basic-gray-3@@ -37,9 +37,18 @@&:not(:last-child)margin-left: $spot-spacing-0_5+ &_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+ padding: $spot-spacing-0_25 $spot-spacing-1+$item-list: ""- @for $i from 1 through 10+ @for $i from 0 through 10$item-list: list.append($item-list, ".spot-list--item")#{$item-list} .spot-list--item-action- padding-left: $i * $spot-spacing-1+ padding-left: $spot-spacing-1 + ($i * $spot-spacing-1)