aboutsummaryrefslogtreecommitdiffstats
path: root/src/styles/abstracts/placeholders/_lists.scss
blob: 780fd218a71589a2c9507d9fd6de68c1ff815767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
%reset-list {
  margin: 0;
  padding: 0;

  ::marker {
    color: var(--color-primary-dark);
  }
}

%regular-list {
  @extend %reset-list;

  list-style-position: inside;

  ul,
  ol {
    margin-block-start: var(--itemSpacing);
    padding-inline-start: var(--spacing-sm);
  }
}

%hierarchical-list {
  @extend %reset-list;

  counter-reset: item;

  > li {
    display: table;
    counter-increment: item;

    &::before {
      content: counters(item, ".") ". ";
      display: table-cell;
      padding-inline-end: var(--spacing-2xs);
      color: var(--color-secondary);
    }
  }
}

%flex-list {
  display: flex;
  gap: var(--itemSpacing, 0);
}

%inline-list {
  @extend %reset-list;
  @extend %flex-list;

  flex-flow: row wrap;
  list-style-position: inside;
}

%list-item {
  &:not(:last-child) {
    margin-block-end: var(--itemSpacing);
  }
}

%inline-description-list {
  @extend %flex-list;

  flex-flow: row wrap;
}

%stack-description-list {
  @extend %flex-list;

  flex-flow: column wrap;
}

%term {
  color: var(--color-fg-light);
  font-weight: 600;
}

%description {
  margin: 0;
  word-break: break-all;
}