Skip to content

Commit

Permalink
Add list style marker options for list block. Fixes #304
Browse files Browse the repository at this point in the history
  • Loading branch information
knice committed Apr 11, 2024
1 parent 5bd477c commit e2e0f18
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
20 changes: 12 additions & 8 deletions wp-blocks/list.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@
border-bottom: none;
}

.site-content ul li,
.site-content ol li {
margin: calc(var(--wp--style--block-gap) / 2) 0;
line-height: var(--wp--custom--line-height--baseline);
}

.is-style-ucsc-upper-alpha-list {
.is-style-ucsc-upper-alpha-list > li {
list-style-type: upper-alpha;
}

.is-style-ucsc-lower-alpha-list {
.is-style-ucsc-lower-alpha-list > li {
list-style-type: lower-alpha;
}

.is-style-ucsc-lower-roman-list > li {
list-style-type: lower-roman;
}

.site-content ul li,
.site-content ol li {
margin: calc(var(--wp--style--block-gap) / 2) 0;
line-height: var(--wp--custom--line-height--baseline);
}
5 changes: 5 additions & 0 deletions wp-blocks/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ wp.domReady( () => {
label: 'Lower alpha',
style_handle: 'ucsc-list',
} );
wp.blocks.registerBlockStyle( 'core/list', {
name: 'ucsc-lower-roman-list',
label: 'Lower roman',
style_handle: 'ucsc-list',
} );
// Styles for core/button
wp.blocks.registerBlockStyle( 'core/button', {
name: 'ucsc-blue',
Expand Down

0 comments on commit e2e0f18

Please sign in to comment.