From 0f8255afeb7db8ca108df3f8f553acebe5fc5904 Mon Sep 17 00:00:00 2001 From: CGQAQ Date: Wed, 6 Dec 2023 15:21:32 +0800 Subject: [PATCH] fix: style of editor --- pnpm-lock.yaml | 9 +++++++++ web/core/lib/editor/editor.css | 4 ++++ web/core/package.json | 11 +++++++---- web/core/postcss.config.js | 6 ++++++ web/core/tailwind.config.js | 8 ++++++++ 5 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 web/core/postcss.config.js create mode 100644 web/core/tailwind.config.js diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5abc51c..f30c510 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -312,6 +312,15 @@ importers: '@types/prosemirror-view': specifier: ^1.24.0 version: 1.24.0 + autoprefixer: + specifier: ^10.0.1 + version: 10.4.16(postcss@8.4.32) + postcss: + specifier: ^8 + version: 8.4.32 + tailwindcss: + specifier: ^3.3.0 + version: 3.3.6(ts-node@10.9.1) web/studio: dependencies: diff --git a/web/core/lib/editor/editor.css b/web/core/lib/editor/editor.css index cb45e3d..ecdaeed 100644 --- a/web/core/lib/editor/editor.css +++ b/web/core/lib/editor/editor.css @@ -2,6 +2,10 @@ @import '@/../node_modules/@radix-ui/colors/mauve.css'; @import '@/../node_modules/@radix-ui/colors/violet.css'; +@tailwind base; +@tailwind components; +@tailwind utilities; +@tailwind screens; .tiptap { font-size: 1.1em; } diff --git a/web/core/package.json b/web/core/package.json index 353e8e1..52f23a4 100644 --- a/web/core/package.json +++ b/web/core/package.json @@ -15,7 +15,7 @@ "import": "./dist/main.js" }, "./package.json": "./package.json", - "./style.css": "./dist/assets/style.css" + "./style.css": "./dist/assets/main.css" }, "typesVersions": { "*": { @@ -41,8 +41,6 @@ "react-dom": "^18.2.0" }, "dependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0", "@radix-ui/colors": "^3.0.0", "@radix-ui/popper": "^0.1.0", "@radix-ui/react-accordion": "^1.1.2", @@ -103,6 +101,8 @@ "prosemirror-changeset": "^2.2.1", "prosemirror-keymap": "^1.2.2", "prosemirror-view": "^1.32.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-i18next": "^13.5.0", "react-select": "^5.8.0", "react-spinners": "^0.13.8", @@ -115,6 +115,9 @@ "devDependencies": { "@types/prosemirror-keymap": "^1.2.0", "@types/prosemirror-model": "^1.17.0", - "@types/prosemirror-view": "^1.24.0" + "@types/prosemirror-view": "^1.24.0", + "autoprefixer": "^10.0.1", + "postcss": "^8", + "tailwindcss": "^3.3.0" } } diff --git a/web/core/postcss.config.js b/web/core/postcss.config.js new file mode 100644 index 0000000..2e7af2b --- /dev/null +++ b/web/core/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/web/core/tailwind.config.js b/web/core/tailwind.config.js new file mode 100644 index 0000000..c50c0a2 --- /dev/null +++ b/web/core/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ['./lib/**/*.{js,jsx,ts,tsx}'], + theme: { + extend: {}, + }, + plugins: [], +};