Skip to content

Commit 64184e9

Browse files
madassdevJhumanJ
andcommitted
fix: dark mode issues on form preview (#301)
* fix: dark mode issues on form preview * Fix darkmode issues --------- Co-authored-by: Julien Nahum <julien@nahum.net>
1 parent 4ddb30c commit 64184e9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

client/components/open/forms/OpenFormField.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default {
230230
classes += '-mx-4 px-4 -my-1 py-1 group/nffield relative transition-colors'
231231
232232
if (this.beingEdited) {
233-
classes += ' bg-blue-50 rounded-md'
233+
classes += ' bg-blue-50 dark:bg-gray-800 rounded-md'
234234
}
235235
}
236236
return classes

client/tailwind.config.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ module.exports = {
1212
],
1313
safelist: [
1414
{
15-
pattern: /.*bg-(blue|gray|red|yellow|green).*/,
15+
pattern: /.*bg-(blue|gray|red|yellow|green).*/,
1616
},
17-
...['green', 'red', 'blue', 'yellow'].map((color) => ['bg-' + color + '-100', 'border-' + color + '-500']).flat() // Alerts
17+
...['green', 'red', 'blue', 'yellow'].map((color) => ['bg-' + color + '-100', 'border-' + color + '-500']).flat(), // Alerts
18+
...['dark:hover:bg-notion-dark-light']
1819
],
1920
darkMode: 'class', // or 'media' or 'class'
2021
theme: {
@@ -26,8 +27,8 @@ module.exports = {
2627
'16%': {transform: 'translateY(+10%)'}
2728
},
2829
'infinite-scroll': {
29-
from: { transform: 'translateX(0)' },
30-
to: { transform: 'translateX(-100%)' },
30+
from: {transform: 'translateX(0)'},
31+
to: {transform: 'translateX(-100%)'},
3132
}
3233
},
3334
animation: {
@@ -84,7 +85,7 @@ module.exports = {
8485
},
8586
plugins: [
8687
require('@tailwindcss/aspect-ratio'),
87-
plugin(function({ addVariant }) {
88+
plugin(function ({addVariant}) {
8889
addVariant('between', '&:not(:first-child):not(:last-child)')
8990
addVariant('hocus', ['&:hover', '&:focus'])
9091
})

0 commit comments

Comments
 (0)