From 482ad401d46995850d101d4d372631e4755adf37 Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Tue, 24 Feb 2026 21:23:52 -0800 Subject: [PATCH] fix: eradicate tailwind @apply usage in vue styles (#9146) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Remove Tailwind `@apply` from Vue styles across `src/` and `apps/desktop-ui/src/` to align with Tailwind v4 guidance, replacing usages with template utilities or native CSS while preserving behavior. ## Changes - **What**: - Batch 1: migrated low-risk template/style utility bundles out of `@apply`. - Batch 2: converted PrimeVue/`:deep()` override `@apply` blocks to native CSS declarations. - Batch 3: converted `src/components/node/NodeHelpContent.vue` markdown styling from `@apply` to native CSS/token-based declarations. - Batch 4: converted final desktop pseudo-element `@apply` styles and removed stale `@reference` directives no longer required. - Verified `rg -n "^\s*@apply\b" src apps -g "*.vue"` has no real CSS `@apply` directives remaining (only known template false-positive event binding in `NodeSearchContent.vue`). ## Review Focus - Visual parity in components that previously depended on `@apply` in `:deep()` selectors and markdown content: - topbar tabs/popovers, dialogs, breadcrumb, terminal overrides - desktop install/dialog/update/maintenance surfaces - node help markdown rendering - Confirm no regressions from removal of now-unneeded `@reference` directives. ## Screenshots (if applicable) - No new screenshots included in this PR. - Screenshot Playwright suite was run with `--grep="@screenshot"` and reports baseline diffs in this environment (164 passed, 39 failed, 3 skipped) plus a teardown `EPERM` restore error on local path `C:\Users\DrJKL\ComfyUI\LTXV\user`. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9146-fix-eradicate-tailwind-apply-usage-in-vue-styles-3116d73d3650813d8642e0bada13df32) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .stylelintrc.json | 2 +- apps/desktop-ui/src/assets/css/style.css | 36 ++++ .../tabs/terminal/BaseTerminal.vue | 10 +- .../components/common/LanguageSelector.vue | 12 +- .../install/InstallLocationPicker.vue | 46 ++++- .../src/components/maintenance/TaskCard.vue | 72 +++----- .../src/views/DesktopDialogView.vue | 35 +--- .../src/views/DesktopUpdateView.vue | 17 +- apps/desktop-ui/src/views/InstallView.vue | 20 ++- apps/desktop-ui/src/views/MaintenanceView.vue | 9 +- .../desktop-ui/src/views/NotSupportedView.vue | 5 +- apps/desktop-ui/src/views/ServerStartView.vue | 2 - browser_tests/fixtures/selectors.ts | 7 + browser_tests/tests/selectionToolbox.spec.ts | 74 ++++---- .../tests/vueNodes/nodeStates/colors.spec.ts | 15 +- docs/guidance/vue-components.md | 4 + lint-staged.config.ts | 16 +- package.json | 4 +- packages/design-system/src/css/style.css | 1 + .../tabs/terminal/BaseTerminal.vue | 7 +- .../breadcrumb/SubgraphBreadcrumb.vue | 17 +- .../breadcrumb/SubgraphBreadcrumbItem.vue | 10 +- src/components/common/FormItem.vue | 8 +- src/components/common/SearchBox.vue | 2 - src/components/common/SearchFilterChip.vue | 42 ++--- src/components/dialog/GlobalDialog.vue | 22 ++- .../content/setting/KeybindingPanel.vue | 31 ++-- .../dialog/content/signin/SignInForm.test.ts | 9 +- .../dialog/content/signin/SignInForm.vue | 20 +-- .../ColorPickerButton.test.ts | 38 +++- .../selectionToolbox/ColorPickerButton.vue | 16 +- src/components/graph/widgets/DomWidget.vue | 13 +- src/components/node/NodeHelpContent.vue | 164 +++++++++++------- src/components/searchbox/NodeSearchFilter.vue | 16 +- src/components/sidebar/SideToolbar.vue | 2 - src/components/sidebar/SidebarIcon.vue | 17 +- .../sidebar/tabs/SidebarTabTemplate.vue | 18 +- .../sidebar/tabs/nodeLibrary/NodeTreeLeaf.vue | 10 +- src/components/topbar/WorkflowTabPopover.vue | 37 ++-- src/components/topbar/WorkflowTabs.vue | 44 +++-- 40 files changed, 501 insertions(+), 429 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 26ce840f1e..4eaf9d1e23 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -40,12 +40,12 @@ "block-no-empty": true, "no-descending-specificity": null, "no-duplicate-at-import-rules": true, + "at-rule-disallowed-list": ["apply"], "at-rule-no-unknown": [ true, { "ignoreAtRules": [ "tailwind", - "apply", "layer", "config", "theme", diff --git a/apps/desktop-ui/src/assets/css/style.css b/apps/desktop-ui/src/assets/css/style.css index 0eef377ae2..1ff895f064 100644 --- a/apps/desktop-ui/src/assets/css/style.css +++ b/apps/desktop-ui/src/assets/css/style.css @@ -4,3 +4,39 @@ position: absolute; inset: 0; } + +.p-button-secondary { + border: none; + background-color: var(--color-neutral-600); + color: var(--color-white); +} + +.p-button-secondary:hover { + background-color: var(--color-neutral-550); +} + +.p-button-secondary:active { + background-color: var(--color-neutral-500); +} + +.p-button-danger { + background-color: var(--color-coral-red-600); +} + +.p-button-danger:hover { + background-color: var(--color-coral-red-500); +} + +.p-button-danger:active { + background-color: var(--color-coral-red-400); +} + +.task-div .p-card { + transition: opacity var(--default-transition-duration); + --p-card-background: var(--p-button-secondary-background); + opacity: 0.9; +} + +.task-div .p-card:hover { + opacity: 1; +} diff --git a/apps/desktop-ui/src/components/bottomPanel/tabs/terminal/BaseTerminal.vue b/apps/desktop-ui/src/components/bottomPanel/tabs/terminal/BaseTerminal.vue index ca0dcf34ec..3bc8db4cf3 100644 --- a/apps/desktop-ui/src/components/bottomPanel/tabs/terminal/BaseTerminal.vue +++ b/apps/desktop-ui/src/components/bottomPanel/tabs/terminal/BaseTerminal.vue @@ -101,13 +101,15 @@ onUnmounted(() => { diff --git a/apps/desktop-ui/src/components/common/LanguageSelector.vue b/apps/desktop-ui/src/components/common/LanguageSelector.vue index 8853c105d0..d8cf45f7a0 100644 --- a/apps/desktop-ui/src/components/common/LanguageSelector.vue +++ b/apps/desktop-ui/src/components/common/LanguageSelector.vue @@ -187,13 +187,17 @@ async function onLocaleChange(event: SelectChangeEvent) { diff --git a/apps/desktop-ui/src/components/install/InstallLocationPicker.vue b/apps/desktop-ui/src/components/install/InstallLocationPicker.vue index f962ca56c8..9921df362b 100644 --- a/apps/desktop-ui/src/components/install/InstallLocationPicker.vue +++ b/apps/desktop-ui/src/components/install/InstallLocationPicker.vue @@ -269,26 +269,43 @@ const onFocus = async () => { diff --git a/apps/desktop-ui/src/views/DesktopDialogView.vue b/apps/desktop-ui/src/views/DesktopDialogView.vue index 105117cab0..3fd28c35cf 100644 --- a/apps/desktop-ui/src/views/DesktopDialogView.vue +++ b/apps/desktop-ui/src/views/DesktopDialogView.vue @@ -1,10 +1,10 @@