From e75275dfff38afa1bd99123080a0249f86a8d72a Mon Sep 17 00:00:00 2001 From: Hayden <48267247+hayden-fr@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:04:49 +0800 Subject: [PATCH] fix: Container queries occasionally fail (#88) - Use js dynamic calculation instead of container query - Remove @tailwindcss/container-queries --- package.json | 1 - pnpm-lock.yaml | 12 ------- src/components/DialogDownload.vue | 10 ++++-- src/components/DialogManager.vue | 44 +++++++++++++---------- src/components/ModelCard.vue | 12 +++++-- src/components/ModelContent.vue | 13 +++++-- src/components/ModelPreview.vue | 17 ++++----- src/hooks/container.ts | 60 +++++++++++++++++++++++++++++++ src/main.ts | 2 ++ src/types/shims.d.ts | 1 + tailwind.config.js | 2 -- 11 files changed, 123 insertions(+), 51 deletions(-) create mode 100644 src/hooks/container.ts diff --git a/package.json b/package.json index 50e0865..e99e9ac 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "prepare": "husky" }, "devDependencies": { - "@tailwindcss/container-queries": "^0.1.1", "@types/lodash": "^4.17.9", "@types/markdown-it": "^14.1.2", "@types/node": "^22.5.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b59fef..2ac8c38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,9 +36,6 @@ importers: specifier: ^2.6.0 version: 2.6.0 devDependencies: - '@tailwindcss/container-queries': - specifier: ^0.1.1 - version: 0.1.1(tailwindcss@3.4.12) '@types/lodash': specifier: ^4.17.9 version: 4.17.9 @@ -470,11 +467,6 @@ packages: cpu: [x64] os: [win32] - '@tailwindcss/container-queries@0.1.1': - resolution: {integrity: sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==} - peerDependencies: - tailwindcss: '>=3.2.0' - '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -2000,10 +1992,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.22.0': optional: true - '@tailwindcss/container-queries@0.1.1(tailwindcss@3.4.12)': - dependencies: - tailwindcss: 3.4.12 - '@types/estree@1.0.5': {} '@types/linkify-it@5.0.0': {} diff --git a/src/components/DialogDownload.vue b/src/components/DialogDownload.vue index bd0c8ca..84f5f82 100644 --- a/src/components/DialogDownload.vue +++ b/src/components/DialogDownload.vue @@ -1,9 +1,9 @@