Skip to content

Commit 91ed965

Browse files
committed
site: add collections rules
* closes CERNDocumentServer/cds-rdm#632
1 parent 74dfa06 commit 91ed965

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

  • invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals

‎invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/site.overrides‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,3 +716,31 @@ blockquote {
716716
}
717717
}
718718
}
719+
720+
/*-------------------------
721+
Collections Table Styling
722+
(Used by invenio-communities)
723+
-------------------------*/
724+
725+
/* Background color for nested collections based on depth */
726+
.generate-depth-backgrounds(@i: 1) when (@i <= 10) {
727+
.collection-depth-bg[data-depth="@{i}"] {
728+
background-color: rgba(0, 0, 0, (@i * 0.05)) !important;
729+
}
730+
.generate-depth-backgrounds(@i + 1);
731+
}
732+
.generate-depth-backgrounds();
733+
734+
/* Padding for nested collections based on depth */
735+
.collection-depth-padding[data-depth="0"],
736+
.collection-depth-padding[data-depth="1"] {
737+
padding-left: 1rem !important;
738+
}
739+
740+
.generate-depth-padding(@i: 2) when (@i <= 10) {
741+
.collection-depth-padding[data-depth="@{i}"] {
742+
padding-left: (@i * 1rem) !important;
743+
}
744+
.generate-depth-padding(@i + 1);
745+
}
746+
.generate-depth-padding();

0 commit comments

Comments
 (0)