Fix tailwind css setup (#768)

* Fix tailwind css setup

* Install as dev dep

* Uninstall primeui tailwind
This commit is contained in:
Chenlei Hu
2024-09-09 16:56:32 +09:00
committed by GitHub
parent 534ea17816
commit a41de30dc5
5 changed files with 16 additions and 13 deletions

9
package-lock.json generated
View File

@@ -1,21 +1,16 @@
{ {
"name": "comfyui-frontend", "name": "comfyui-frontend",
"version": "1.2.47", "version": "1.2.48",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "comfyui-frontend", "name": "comfyui-frontend",
"version": "1.2.47", "version": "1.2.48",
"dependencies": { "dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.2.1", "@atlaskit/pragmatic-drag-and-drop": "^1.2.1",
<<<<<<< HEAD
"@comfyorg/litegraph": "^0.7.65", "@comfyorg/litegraph": "^0.7.65",
"@primevue/themes": "^4.0.0-rc.2",
=======
"@comfyorg/litegraph": "^0.7.64",
"@primevue/themes": "^4.0.5", "@primevue/themes": "^4.0.5",
>>>>>>> e82b957 ([Chore] Update primevue)
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.0.5",
"@vueuse/core": "^11.0.0", "@vueuse/core": "^11.0.0",
"axios": "^1.7.4", "axios": "^1.7.4",

View File

@@ -1,3 +1,10 @@
@layer primevue, tailwind-utilities;
@layer tailwind-utilities {
@tailwind components;
@tailwind utilities;
}
:root { :root {
--fg-color: #000; --fg-color: #000;
--bg-color: #fff; --bg-color: #fff;

View File

@@ -144,11 +144,6 @@ const tabValue = computed(() =>
</script> </script>
<style> <style>
/* Remove after we have tailwind setup */
.border-none {
border: none !important;
}
.settings-tab-panels { .settings-tab-panels {
padding-top: 0px !important; padding-top: 0px !important;
} }

View File

@@ -26,7 +26,10 @@ app
preset: ComfyUIPreset, preset: ComfyUIPreset,
options: { options: {
prefix: 'p', prefix: 'p',
cssLayer: false, cssLayer: {
name: 'primevue',
order: 'primevue, tailwind-utilities'
},
// This is a workaround for the issue with the dark mode selector // This is a workaround for the issue with the dark mode selector
// https://github.com/primefaces/primevue/issues/5515 // https://github.com/primefaces/primevue/issues/5515
darkModeSelector: '.dark-theme, :root:has(.dark-theme)' darkModeSelector: '.dark-theme, :root:has(.dark-theme)'

View File

@@ -1,6 +1,9 @@
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
export default { export default {
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
corePlugins: {
preflight: false // This disables Tailwind's base styles
},
theme: { theme: {
extend: {} extend: {}
}, },