Skip to content

Commit 3fb2398

Browse files
committed
fix(site): background color of block editor popovers
1 parent 7abf1e1 commit 3fb2398

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.knosys/presets/tailwind/app.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
const { nextui } = require('@nextui-org/react')
22
const { fontFamily } = require('tailwindcss/defaultTheme')
33

4+
// for https://novel.sh/
5+
const novelColors = {
6+
foreground: 'hsl(var(--foreground))',
7+
destructive: {
8+
DEFAULT: 'hsl(var(--destructive))',
9+
foreground: 'hsl(var(--destructive-foreground))',
10+
},
11+
muted: {
12+
DEFAULT: 'hsl(var(--muted))',
13+
foreground: 'hsl(var(--muted-foreground))',
14+
},
15+
accent: {
16+
DEFAULT: 'hsl(var(--accent))',
17+
foreground: 'hsl(var(--accent-foreground))',
18+
},
19+
popover: {
20+
DEFAULT: 'hsl(var(--popover))',
21+
foreground: 'hsl(var(--popover-foreground))',
22+
},
23+
card: {
24+
DEFAULT: 'hsl(var(--card))',
25+
foreground: 'hsl(var(--card-foreground))',
26+
},
27+
};
28+
429
/** @type {import('tailwindcss').Config} */
530
module.exports = {
631
darkMode: 'class',
@@ -80,6 +105,7 @@ module.exports = {
80105
'bg-secondary': '#173C32',
81106
primary: '#F3FF65',
82107
},
108+
...novelColors,
83109
},
84110
borderRadius: {
85111
none: '0',

src/shared/styles/all.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@
4141
::-webkit-details-marker { display:none; }
4242
@layer base {
4343
:root {
44+
--foreground: 222.2 84% 4.9%;
45+
46+
--card: 0 0% 100%;
47+
--card-foreground: 222.2 84% 4.9%;
48+
49+
--popover: 0 0% 100%;
50+
--popover-foreground: 222.2 84% 4.9%;
51+
52+
--muted: 210 40% 96.1%;
53+
--muted-foreground: 215.4 16.3% 46.9%;
54+
55+
--accent: 210 40% 96.1%;
56+
--accent-foreground: 222.2 47.4% 11.2%;
57+
58+
--destructive: 0 84.2% 60.2%;
59+
--destructive-foreground: 210 40% 98%;
60+
4461
--novel-highlight-default: #ffffff;
4562
--novel-highlight-purple: #f6f3f8;
4663
--novel-highlight-red: #fdebeb;
@@ -53,6 +70,23 @@
5370
}
5471

5572
.dark {
73+
--foreground: 210 40% 98%;
74+
75+
--card: 222.2 84% 4.9%;
76+
--card-foreground: 210 40% 98%;
77+
78+
--popover: 222.2 84% 4.9%;
79+
--popover-foreground: 210 40% 98%;
80+
81+
--muted: 217.2 32.6% 17.5%;
82+
--muted-foreground: 215 20.2% 65.1%;
83+
84+
--accent: 217.2 32.6% 17.5%;
85+
--accent-foreground: 210 40% 98%;
86+
87+
--destructive: 0 62.8% 30.6%;
88+
--destructive-foreground: 210 40% 98%;
89+
5690
--novel-highlight-default: #000000;
5791
--novel-highlight-purple: #3f2c4b;
5892
--novel-highlight-red: #5c1a1a;

0 commit comments

Comments
 (0)