Skip to content

Commit a8da610

Browse files
committed
fix list style
1 parent 420e90e commit a8da610

File tree

1 file changed

+53
-56
lines changed

1 file changed

+53
-56
lines changed

src/scss/06-blocks/core/_list.scss

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Use the not-custom-list class in your theme if you want the basic style
1+
// Use the no-list-style class in your theme if you want the basic style
22

33
%bullet {
44
position: absolute;
5-
top: 12px;
5+
top: 9px;
66
left: 0;
77
width: 5px;
88
height: 5px;
@@ -17,8 +17,8 @@
1717
}
1818

1919
#{context-selector('.blocks-container', '.is-root-container')} {
20-
ul:not(.not-custom-list),
21-
ol:not(.not-custom-list) {
20+
ul,
21+
ol {
2222
&:not([class*="is-style-"]):not([class*="no-list-style"]):not([role="list"]) {
2323
font-size: var(--paragraph--font-size-default, $font-size-base);
2424
line-height: var(--paragraph--line-height-default, $line-height-base);
@@ -31,8 +31,8 @@
3131
}
3232
}
3333

34-
ul:not(.not-custom-list) {
35-
&:not([class*="is-style-"], .no-list-style,[role="list"]) {
34+
ul {
35+
&:not([class*="is-style-"]):not([class*="no-list-style"]):not([role="list"]) {
3636
list-style-type: none;
3737

3838
li {
@@ -57,73 +57,70 @@
5757
}
5858
}
5959

60-
ol:not(.not-custom-list) {
61-
&:not([class*="is-style-"], .no-list-style,[role="list"]) {
60+
ol {
61+
&:not([class*="is-style-"]):not([class*="no-list-style"]):not([role="list"]) {
6262
list-style: none;
6363
counter-reset: section;
6464

65-
&:not([class*="is-style-"]) {
66-
li {
67-
position: relative;
68-
padding-left: 40px;
69-
margin-bottom: calc(.5 * var(--spacing--block-1));
70-
counter-increment: section;
65+
li {
66+
position: relative;
67+
padding-left: 40px;
68+
margin-bottom: calc(.5 * var(--spacing--block-1));
69+
counter-increment: section;
7170

72-
@include rtl {
73-
padding-right: 40px;
74-
padding-left: 0;
75-
}
71+
@include rtl {
72+
padding-right: 40px;
73+
padding-left: 0;
74+
}
7675

77-
&::before {
78-
position: absolute;
79-
top: 0;
80-
left: 0;
81-
font-family: $font-family-secondary;
82-
font-size: var(--paragraph--font-size-default, $font-size-base);
83-
font-weight: 400;
84-
line-height: var(--paragraph--line-height-default, $line-height-base);
85-
color: $color-dark;
86-
text-align: center;
87-
letter-spacing: -.06em;
88-
content: counters(section, "", decimal-leading-zero) " ";
89-
90-
@include rtl {
91-
right: 0;
92-
left: inherit;
93-
transform: translateX(100%);
94-
}
76+
&::before {
77+
position: absolute;
78+
top: 0;
79+
left: 0;
80+
font-size: var(--paragraph--font-size-default, $font-size-base);
81+
font-weight: 400;
82+
line-height: var(--paragraph--line-height-default, $line-height-base);
83+
color: $color-dark;
84+
text-align: center;
85+
letter-spacing: -.06em;
86+
content: counters(section, "", decimal-leading-zero) " ";
87+
88+
@include rtl {
89+
right: 0;
90+
left: inherit;
91+
transform: translateX(100%);
9592
}
93+
}
9694

97-
ol {
98-
margin-top: calc(.5 * var(--spacing--block-1));
99-
margin-bottom: calc(.5 * var(--spacing--block-1));
100-
counter-reset: subsection;
95+
ol {
96+
margin-top: calc(.5 * var(--spacing--block-1));
97+
margin-bottom: calc(.5 * var(--spacing--block-1));
98+
counter-reset: subsection;
10199

102-
li {
103-
counter-increment: subsection;
100+
li {
101+
counter-increment: subsection;
104102

105-
&::before {
106-
content: counters(subsection, ".", lower-alpha) ". ";
107-
}
103+
&::before {
104+
content: counters(subsection, ".", lower-alpha) ". ";
108105
}
109106
}
107+
}
110108

111-
ul {
112-
margin-top: calc(.5 * var(--spacing--block-1));
113-
margin-bottom: calc(.5 * var(--spacing--block-1));
114-
counter-reset: section;
109+
ul {
110+
margin-top: calc(.5 * var(--spacing--block-1));
111+
margin-bottom: calc(.5 * var(--spacing--block-1));
112+
counter-reset: section;
115113

116-
li {
117-
padding-top: 0;
114+
li {
115+
padding-top: 0;
118116

119-
&::before {
120-
@extend %bullet;
121-
transform: translateX(0);
122-
}
117+
&::before {
118+
@extend %bullet;
119+
transform: translateX(0);
123120
}
124121
}
125-
126122
}
123+
127124
}
128125
}
129126
}

0 commit comments

Comments
 (0)