Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(mobile): render markdown list bullets and numbers in the foreground color (#3046)

Ryan Choud2b78eb167f0
diff --git a/apps/mobile/components/bookmarks/BookmarkTextMarkdown.tsx b/apps/mobile/components/bookmarks/BookmarkTextMarkdown.tsx
index 80ea007c..910a9906 100644
--- a/apps/mobile/components/bookmarks/BookmarkTextMarkdown.tsx
+++ b/apps/mobile/components/bookmarks/BookmarkTextMarkdown.tsx
@@ -5,17 +5,23 @@ export default function BookmarkTextMarkdown({ text }: { text: string }) {
return (
<TailwindResolver
className="text-foreground"
- comp={(styles) => (
- <Markdown
- style={{
- text: {
- color: styles?.color?.toString(),
- },
- }}
- >
- {text}
- </Markdown>
- )}
+ comp={(styles) => {
+ const color = styles?.color?.toString();
+ return (
+ <Markdown
+ style={{
+ text: { color },
+ // List bullets and numbers are rendered with these pseudo-class
+ // styles and don't inherit from `text`, so they'd otherwise fall
+ // back to the default black and be invisible in dark mode.
+ bullet_list_icon: { color },
+ ordered_list_icon: { color },
+ }}
+ >
+ {text}
+ </Markdown>
+ );
+ }}
/>
);
}