diff --git a/package-lock.json b/package-lock.json index 78445fdae..5f50bdded 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8608,8 +8608,8 @@ "license": "MIT" }, "node_modules/custom-loaders": { - "resolved": "plugins/custom-loaders", - "link": true + "version": "0.0.0", + "resolved": "file:plugins/custom-loaders" }, "node_modules/cytoscape": { "version": "3.33.1", @@ -21617,9 +21617,6 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } - }, - "plugins/custom-loaders": { - "version": "0.0.0" } } } diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js index 1f20cdade..25a63a539 100644 --- a/src/theme/MDXComponents.js +++ b/src/theme/MDXComponents.js @@ -12,6 +12,31 @@ import CategoryList from '@site/src/components/CategoryList'; library.add(fab, fas, far); // Add all icons to the library so you can use them without importing them individually. +// Custom list components with Tailwind classes to restore styling removed by Preflight +function Ul({ children, ...props }) { + return ( + + ); +} + +function Ol({ children, ...props }) { + return ( +
    + {children} +
+ ); +} + +function Li({ children, ...props }) { + return ( +
  • + {children} +
  • + ); +} + export default { // Re-use the default mapping ...MDXComponents, @@ -19,4 +44,8 @@ export default { FAIcon: FontAwesomeIcon, // Make the FontAwesomeIcon component available in MDX as . // Add custom components CategoryList: CategoryList, // Make the CategoryList component available in MDX as . + // Override HTML elements with Tailwind-styled versions + ul: Ul, + ol: Ol, + li: Li, };