Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { View, Text } from 'react-native';
*/
import { Icon } from '@wordpress/components';
import { Platform } from '@wordpress/element';
import { usePreferredColorSchemeStyle } from '@wordpress/compose';

/**
* Internal dependencies
Expand Down Expand Up @@ -109,9 +110,15 @@ export default function ListStyleType( {
style?.fontSize ? style.fontSize : defaultFontSize,
10
);

const colorWithPreferredScheme = usePreferredColorSchemeStyle(
styles[ 'wp-block-list-item__list-item--default' ],
styles[ 'wp-block-list-item__list-item--default--dark' ]
);

const defaultColor = style?.baseColors?.color?.text
? style.baseColors.color.text
: styles[ 'wp-block-list-item__list-item--default' ].color;
: colorWithPreferredScheme.color;
const color = style?.color ? style.color : defaultColor;

if ( ordered ) {
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/list-item/style.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
font-size: $editor-font-size;
}

.wp-block-list-item__list-item--default--dark {
color: $white;
font-size: $editor-font-size;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick we can remove the font-size here as it would use the value from wp-block-list-item__list-item--default

}

.wp-block-list-item__list-item-ordered--default {
margin-top: 2;
}
Expand Down