Skip to content

Commit

Permalink
feat(@dpc-sdp/ripple-tide-api): update list plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
David Featherston committed Jul 7, 2024
1 parent 3627fb8 commit e86005d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,21 @@ const pluginLists = function (this: any) {
const type = $list.attr('type')

const listTypes = {
1: 'decimal',
a: 'lower-latin',
A: 'upper-latin',
i: 'lower-roman',
I: 'upper-roman',
square: 'square',
disc: 'disc',
circle: 'disc'
square: 'square',
circle: 'disc' // circles selection uses disc (a11y request)
}

$list
.removeAttr('type')
.addClass(`rpl-type-list-${el?.name}--${listTypes[type]}`)
$list.removeAttr('type')

if (listTypes[type]) {
$list.addClass(`rpl-type-list-${el?.name}--${listTypes[type]}`)
}

return $list
})
Expand Down
8 changes: 8 additions & 0 deletions packages/ripple-ui-core/src/styles/utilities/_lists.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
margin-left: var(--rpl-sp-5);
}

&.rpl-type-list-ol--decimal {
list-style-type: decimal;
}

&.rpl-type-list-ol--lower-roman {
list-style-type: lower-roman;
}
Expand Down Expand Up @@ -91,6 +95,10 @@
list-style-type: disc;
}

&.rpl-type-list-ul--circle {
list-style-type: circle;
}

&.rpl-type-list-ul--square {
list-style-type: square;
}
Expand Down

0 comments on commit e86005d

Please sign in to comment.