|
| 1 | +// Use the no-list-style class in your theme if you want the basic style |
| 2 | + |
| 3 | +%marker-ol-default { |
| 4 | + font-size: 16px; |
| 5 | + font-weight: 700; |
| 6 | + line-height: 1.3; |
| 7 | + color: $color-dark; |
| 8 | +} |
| 9 | + |
| 10 | +%marker-ul-default { |
| 11 | + position: absolute; |
| 12 | + top: 7px; |
| 13 | + left: 0; |
| 14 | + width: 6px; |
| 15 | + height: 6px; |
| 16 | + content: ""; |
| 17 | + background-color: $color-dark; |
| 18 | + border-radius: 100%; |
| 19 | + |
| 20 | + @include rtl { |
| 21 | + right: -15px; |
| 22 | + left: inherit; |
| 23 | + } |
| 24 | +} |
| 25 | + |
1 | 26 | #{context-selector('.blocks-container', '.is-root-container')} {
|
| 27 | + --offset-item: 30px; |
| 28 | + --vertical-spaging-item: 16px; |
| 29 | + |
2 | 30 | ul,
|
3 | 31 | ol {
|
4 |
| - // Utility classes |
5 |
| - &.aligncenter { |
6 |
| - padding: 0; |
7 |
| - list-style-position: inside; |
8 |
| - } |
| 32 | + &:not([class*="no-list-style"]):not([role="list"]):not(.chosen-choices):not(.chosen-results) { |
| 33 | + font-size: var(--paragraph--font-size-default, $font-size-base); |
| 34 | + line-height: var(--paragraph--line-height-default, $line-height-base); |
9 | 35 |
|
10 |
| - &.alignright { |
11 |
| - padding: 0; |
12 |
| - text-align: right; |
13 |
| - list-style-position: inside; |
| 36 | + ul, |
| 37 | + ol { |
| 38 | + margin-top: var(--vertical-spaging-item); |
| 39 | + margin-bottom: var(--vertical-spaging-item); |
| 40 | + } |
14 | 41 | }
|
15 | 42 | }
|
16 | 43 |
|
17 | 44 | ul {
|
18 |
| - &:not([class*="is-style-"], .no-list-style) { |
19 |
| - list-style-type: disc; |
| 45 | + &:not([class*="no-list-style"]):not([role="list"]):not(.chosen-choices):not(.chosen-results) { |
| 46 | + list-style-type: none; |
| 47 | + |
| 48 | + li { |
| 49 | + position: relative; |
| 50 | + padding-left: var(--offset-item); |
| 51 | + margin-bottom: var(--vertical-spaging-item); |
20 | 52 |
|
21 |
| - li::marker { |
22 |
| - color: $color-primary; |
| 53 | + @include rtl { |
| 54 | + padding-right: var(--offset-item); |
| 55 | + padding-left: 0; |
| 56 | + } |
| 57 | + |
| 58 | + &::before { |
| 59 | + @extend %marker-ul-default; |
| 60 | + } |
| 61 | + } |
| 62 | + |
| 63 | + ul { |
| 64 | + margin-top: var(--vertical-spaging-item); |
| 65 | + margin-bottom: var(--vertical-spaging-item); |
23 | 66 | }
|
24 | 67 | }
|
25 | 68 | }
|
26 | 69 |
|
27 | 70 | ol {
|
28 |
| - &:not([class*="is-style-"]) { |
29 |
| - list-style-type: decimal; |
| 71 | + padding-left: 10px; |
| 72 | + |
| 73 | + &:not([class*="no-list-style"]):not([role="list"]) { |
| 74 | + > li { |
| 75 | + padding-left: calc(var(--offset-item) * .5); |
| 76 | + margin-bottom: var(--vertical-spaging-item); |
| 77 | + margin-left: calc(var(--offset-item) * .5); |
| 78 | + |
| 79 | + @include rtl { |
| 80 | + padding-right: calc(var(--offset-item) * .5); |
| 81 | + padding-left: 0; |
| 82 | + margin-right: calc(var(--offset-item) * .5); |
| 83 | + margin-left: 0; |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + li { |
| 88 | + &::marker { |
| 89 | + @extend %marker-ol-default; |
| 90 | + } |
| 91 | + |
| 92 | + ol { |
| 93 | + margin-top: var(--vertical-spaging-item); |
| 94 | + margin-bottom: var(--vertical-spaging-item); |
| 95 | + } |
| 96 | + |
| 97 | + ul { |
| 98 | + margin-top: var(--vertical-spaging-item); |
| 99 | + margin-bottom: var(--vertical-spaging-item); |
| 100 | + |
| 101 | + li { |
| 102 | + padding-top: 0; |
| 103 | + |
| 104 | + &::before { |
| 105 | + @extend %marker-ul-default; |
| 106 | + transform: translateX(0); |
| 107 | + } |
| 108 | + } |
| 109 | + } |
30 | 110 |
|
31 |
| - li::marker { |
32 |
| - color: $color-primary; |
33 | 111 | }
|
34 | 112 | }
|
35 | 113 | }
|
|
0 commit comments