Skip to content

Conversation

@robertknight
Copy link
Contributor

Replace uses of our custom focus-ring-visible utility with Tailwind's built-in equivalent styles (focus-ring:visible focus-ring:outline-none). The original reason for our custom utility was to support a polyfill for :focus-visible, but we no longer need/use that polyfill.

This looks the same as before but will be easier to migrate to Tailwind v4. In Tailwind v3 outline-none doesn't actually generate outline-style: none, but the result is equivalent for our purposes. See
https://tailwindcss.com/docs/upgrade-guide#renamed-outline-utility.

The focus-ring-visible plugin is still included in the package because downstream apps are still using it. We can remove it after the same migration is applied there.

Replace uses of our custom `focus-ring-visible` utility with Tailwind's built-in
equivalent styles (`focus-ring:visible focus-ring:outline-none`). The original
reason for our custom utility was to support a polyfill for `:focus-visible`,
but we no longer need/use that polyfill.

This looks the same as before but will be easier to migrate to Tailwind v4. In
Tailwind v3 `outline-none` doesn't actually generate `outline-style: none`, but
the result is equivalent for our purposes.  See
https://tailwindcss.com/docs/upgrade-guide#renamed-outline-utility.

The focus-ring-visible plugin is still included in the package because
downstream apps are still using it. We can remove it after the same migration is
applied there.
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ce6d9c5) to head (e3fd59d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2083   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           71        71           
  Lines         1364      1364           
  Branches       509       509           
=========================================
  Hits          1364      1364           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@robertknight robertknight merged commit 50c5669 into main Sep 10, 2025
4 checks passed
@robertknight robertknight deleted the focus-visible-ring branch September 10, 2025 11:53
robertknight added a commit to hypothesis/h that referenced this pull request Sep 10, 2025
 - Update Tailwind dependencies
 - Convert forms.scss to a "plain" CSS file. This avoids the SASS
   compiler trying to preprocess the Tailwind imports.
 - Update @hypothesis/annotation-ui for hypothesis/annotation-ui#87
 - Update @hypothesis/frontend-build for Tailwind v4 support
 - Update @hypothesis/frontend-shared for hypothesis/frontend-shared#2083
robertknight added a commit to hypothesis/h that referenced this pull request Sep 10, 2025
 - Update Tailwind dependencies
 - Convert forms.scss to a "plain" CSS file. This avoids the SASS
   compiler trying to preprocess the Tailwind imports.
 - Update @hypothesis/annotation-ui for hypothesis/annotation-ui#87
 - Update @hypothesis/frontend-build for Tailwind v4 support
 - Update @hypothesis/frontend-shared for hypothesis/frontend-shared#2083
robertknight added a commit to hypothesis/h that referenced this pull request Sep 10, 2025
 - Update Tailwind dependencies
 - Convert forms.scss to a "plain" CSS file. This avoids the SASS
   compiler trying to preprocess the Tailwind imports.
 - Update @hypothesis/annotation-ui for hypothesis/annotation-ui#87
 - Update @hypothesis/frontend-build for Tailwind v4 support
 - Update @hypothesis/frontend-shared for hypothesis/frontend-shared#2083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants