Repository navigation
Conversation
The hub only serves the e2e test page and static data files, so a CSS framework brings no benefit. Replace Tailwind classes with plain CSS (globals.css + CSS Modules) and shadcn/ui components with native elements, keeping the test page DOM that e2e relies on unchanged. Also add E2E_HUB_BASE_URL to route the deployed hub to a local build so hub changes can be verified with e2e before deploying. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
- postcss-shadow-dom-properties: declare the initial values of @property-registered custom properties inside the stylesheet, since Chrome ignores @Property in shadow trees (needed by Tailwind CSS v4) - findRemUsages: detect rem units, which follow the user's page root font-size inside the content script's Shadow DOM Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
- Use @tailwindcss/vite and move the theme from tailwind.config.js to CSS (@theme); replace tailwindcss-animate with tw-animate-css and update tailwind-merge to v3 - Redefine every rem-based token in px (--spacing: 4px, text, container, radius) so the content script UI doesn't follow the user's page root font-size, and fail the build if content script CSS contains rem - Apply the Shadow DOM @Property fallback via PostCSS - Rename utilities for v4 (shadow, rounded, outline-hidden, ...), add @reference to CSS modules using @apply, and restore v3 defaults (placeholder color, button cursor) - Ignore 'Request context disposed' in the e2e hub route helper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
…canning - Use @theme inline for tokens that reference runtime CSS variables. With a plain @theme, --color-background was resolved on :root/:host, so the popup's per-element --background override (user styles) no longer changed bg-background (e2e E2E-72) - Scan only src/ (excluding tests) for class names; plain text in docs generated unused rem-based utilities Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
Windows opened by the extension (e.g. the PageAction recorder) load the deployed HTML because their navigation can't be intercepted; forwarding its hashed assets to the local build returned 404 and broke the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
…olation - Declare `@layer properties` at the top of every CSS file that uses layers, so it stays the lowest-priority layer whatever the chunk injection order. - Fail the build when no content script CSS could be checked for rem, and also detect uppercase REM and other root-relative units (rlh, rex, ...). - Define breakpoints in px as in v3, so media queries don't follow the browser's default font-size setting. - e2e: return the local 404 for missing hub pages instead of falling back to the deployed hub, and match the base path on a segment boundary. - Fix a lint error in the cn() test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #497
概要
拡張機能を Tailwind CSS v4 に移行し、Hub では Tailwind CSS(と shadcn/ui)を使うのをやめます。
方針と手順の詳細は
docs/design/tailwindcss-v4-migration.mdにあります。content script はユーザーのページ上で動くので、ユーザーのページに影響を与えず、ユーザーのページからも影響を受けないことを前提に設計しています。
変更内容
Extension
@tailwindcss/viteと、CSS の中で設定を書く方式(@theme)に移行しました。tailwind.config.jsとpostcss.config.cjsは削除しました。tailwindcss-animateをtw-animate-cssに置き換えました。tailwind-mergeを v3 に上げました(shared パッケージも同様)。--spacing、文字サイズ--text-*、幅--container-*、角丸--radius-*)。これで、ユーザーのページの root font-size が UI に影響しなくなります。--breakpoint-*)も v3 と同じ px で定義しました。rem のままだと、Chrome の既定の文字サイズ設定に連動してしまうためです。rlhなどページの root 要素に連動する単位)が含まれていたら、ビルドが失敗するようにしました(findRemUsages)。検査する CSS が見つからない場合もビルドを失敗させます。@propertyが効かない問題への対策@propertyを無視します。そこで、@propertyで決めている初期値を、優先度の最も低い@layer propertiesに通常の変数として書き出す PostCSS プラグインを自作しました(postcss-shadow-dom-properties)。@layer properties;を宣言し、注入の順番に関係なく最も優先度の低いレイヤーになるようにしています。document.headには何も追加しません。@theme inlineで定義しました。v4 の既定のやり方では、ユーザースタイルで指定した色が反映されなくなる退行(E2E-72)があり、それを直すためです。src(テストを除く)に限りました。AGENTS.md などの説明文から、不要なクラスが作られないようにするためです。roundedをrounded-smに、bg-gradient-to-rをbg-linear-to-rに、など)。@applyを使う CSS Modules には@referenceを追加しました。Hub
e2e
E2E_HUB_BASE_URLを指定すると、デプロイ済みの hub への通信をローカルでビルドした hub に向けられるようにしました(e2e/utils/hubRoute.ts)。手順はpackages/hub/AGENTS.mdにあります。その他
検証結果
注意点
🤖 Generated with Claude Code
https://claude.ai/code/session_01KWGX774FR5iixzXqS7CMpU