Skip to content

Commit 728e041

Browse files
committed
Make uniform list between BO and FO
1 parent 4616d76 commit 728e041

3 files changed

Lines changed: 34 additions & 12 deletions

File tree

src/scss/abstract/_mixins.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,29 @@
250250
perspective: $perspective;
251251
}
252252

253+
//List mixins
254+
@mixin wysiwyg__list($type: ul) {
255+
padding-left: 0;
256+
margin: $base-spacing 0 $base-spacing $half-base-spacing;
257+
258+
#{$type} {
259+
margin-top: $half-base-spacing;
260+
margin-bottom: $half-base-spacing;
261+
}
262+
263+
li {
264+
margin: 0 0 $half-base-spacing;
265+
}
266+
267+
@if $type == ul {
268+
list-style: disc inside none;
269+
}
270+
271+
@if $type == ol {
272+
list-style: decimal inside none;
273+
}
274+
}
275+
253276
//Title mixins
254277
@mixin title($size: md) {
255278
font-weight: 700;

src/scss/editor-style.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,13 @@
4343
.editor-post-title__input {
4444
font-family: $customfont-2;
4545
}
46+
}
47+
48+
.block-library-list {
49+
ul {
50+
@include wysiwyg__list();
51+
}
52+
ol {
53+
@include wysiwyg__list(ol);
54+
}
4655
}

src/scss/wp/_wysiwyg.scss

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,11 @@
1818
}
1919

2020
ul:not([class]) {
21-
list-style: disc inside none;
22-
margin: 0 0 $base-spacing;
23-
24-
li {
25-
margin: 0 0 $half-base-spacing;
26-
}
21+
@include wysiwyg__list();
2722
}
2823

2924
ol:not([class]) {
30-
list-style: decimal inside none;
31-
margin: 0 0 $base-spacing;
32-
33-
li {
34-
margin: 0 0 $half-base-spacing;
35-
}
25+
@include wysiwyg__list(ol);
3626
}
3727

3828
img {

0 commit comments

Comments
 (0)