diff --git a/web/themes/custom/opdavies/assets/css/base/tables.pcss b/web/themes/custom/opdavies/assets/css/base/tables.pcss new file mode 100644 index 0000000..710c7b0 --- /dev/null +++ b/web/themes/custom/opdavies/assets/css/base/tables.pcss @@ -0,0 +1,5 @@ +@layer base { + th { + @apply dark:text-white + } +} diff --git a/web/themes/custom/opdavies/assets/css/components/block.pcss b/web/themes/custom/opdavies/assets/css/components/block.pcss index 251c54b..6a2738c 100644 --- a/web/themes/custom/opdavies/assets/css/components/block.pcss +++ b/web/themes/custom/opdavies/assets/css/components/block.pcss @@ -1,5 +1,5 @@ @layer components { .sidebar .block { - @apply p-6 rounded bg-gray-100 + @apply p-6 rounded bg-gray-100 dark:bg-gray-750 } } diff --git a/web/themes/custom/opdavies/assets/css/components/note.pcss b/web/themes/custom/opdavies/assets/css/components/note.pcss index 69a911c..3f311e8 100644 --- a/web/themes/custom/opdavies/assets/css/components/note.pcss +++ b/web/themes/custom/opdavies/assets/css/components/note.pcss @@ -1,6 +1,10 @@ @layer components { .note { - @apply max-w-full prose bg-blue-200 border-blue-600 border-l-4 mb-4 p-4 rounded; + @apply max-w-full prose bg-blue-200 border-blue-600 border-l-4 mb-4 p-4 rounded dark:prose-dark; + + * { + @apply dark:text-gray-700 + } p a { @apply underline hover:no-underline diff --git a/web/themes/custom/opdavies/tailwind.config.js b/web/themes/custom/opdavies/tailwind.config.js index 9e516d2..91288c2 100644 --- a/web/themes/custom/opdavies/tailwind.config.js +++ b/web/themes/custom/opdavies/tailwind.config.js @@ -9,6 +9,7 @@ const { fontFamily } = defaultTheme const { variants } = defaultConfig module.exports = { + darkMode: 'media', important: true, purge: { content: [ @@ -49,6 +50,24 @@ module.exports = { 'pre code::before': false, 'pre code::after': false } + }, + dark: { + css: { + color: theme('colors.gray.200'), + + code: { + backgroundColor: theme('colors.gray.750'), + color: theme('colors.gray.200') + }, + + 'blockquote, h2, h3': { + color: theme('colors.white') + }, + + strong: { + color: theme('colors.gray.200') + } + } } }), colors, @@ -84,6 +103,9 @@ module.exports = { borderStyle: [...variants.borderStyle, 'hover', 'focus'], borderWidth: [...variants.borderWidth, 'hover', 'focus'], margin: [...variants.margin, 'first', 'last', 'odd', 'even'], - typography: ['responsive'] + typography: ['responsive'], + extend: { + typography: ['dark'] + } } } diff --git a/web/themes/custom/opdavies/templates/block/block--inline-block--recommendation.html.twig b/web/themes/custom/opdavies/templates/block/block--inline-block--recommendation.html.twig index 4cdb7b2..6dc9a83 100644 --- a/web/themes/custom/opdavies/templates/block/block--inline-block--recommendation.html.twig +++ b/web/themes/custom/opdavies/templates/block/block--inline-block--recommendation.html.twig @@ -10,7 +10,7 @@ " >