focus:outline-none does not remove the focus border in Tailwind
focus:outline-none has no visible effect on an inputShort answer
focus:outline-none only controls the CSS outline. A blue or black ring is often a ring utility (box-shadow) from your form markup, so remove it with focus:ring-0. In Tailwind v4 the old outline-none behaviour is called outline-hidden. If nothing changes, the class may not have been generated.
Fix it fast
1Find out which cause you have
Open the browser dev tools, focus the field and read the Styles panel. It shows whether the line comes from outline, from box-shadow (ring), or whether your class is missing from the stylesheet.
grep -rn "outline-none\|outline-hidden\|focus:ring" resources/views resources/js | head2Match what you see, then jump to its fix
- 1
In dev tools the focus effect is a box-shadow (--tw-ring-shadow), and outline is already none.The ring is a ring utility, not an outlineFix - 2
The project was upgraded from v3 and fields now behave differently, or a transparent outline shows in forced-colors mode.Tailwind v4 renamed the utilities (outline-none vs outline-hidden)Fix - 3
Dev tools shows no rule for focus:outline-none at all.The class is never generated, so no CSS exists for itFix
- 1
What does the error look like?
focus:outline-none has no visible effect on an inputA ring still shows around the field when focused
Cause 1 of 3
The ring is a ring utility, not an outline
1Check
Ring utilities such as ring-2 or focus:ring draw their line with the --tw-ring-shadow variable, which is a different property from outline. outline-none cannot remove it.
grep -rn "ring" resources/views | head2Fix
Remove the ring utility, or set its width to zero for the focus state.
<input class="focus:outline-none focus:ring-0" />3Verify
Rebuild assets, reload and focus the field.
npm run buildConfirmed by tailwindcss.com
Cause 2 of 3
Tailwind v4 renamed the utilities (outline-none vs outline-hidden)
1Check
In v4 outline-none sets outline-style: none, while the old v3 behaviour, a transparent outline that stays visible in forced colors mode, is outline-hidden. The v4 upgrade guide also changed the default ring width from 3px to 1px.
grep -n "tailwindcss" package.json
grep -rn "outline-none" resources/views | head2Fix
Pick the one you mean: outline-hidden keeps the accessible fallback, outline-none removes the outline completely. Give focused fields your own visible style either way.
<input class="focus:outline-hidden focus:border-indigo-600" />3Verify
Focus the field in the browser and in a forced-colors setting if you support it.
npm run buildConfirmed by tailwindcss.com
Cause 3 of 3
The class is never generated, so no CSS exists for it
1Check
Tailwind v4 skips files in .gitignore and node_modules, and it cannot read class names that are built from pieces.
grep -rn "@source\|@import \"tailwindcss\"" resources/css2Fix
Write complete class names in the template, and register ignored folders with @source.
/* resources/css/app.css */
@import "tailwindcss";
@source "../../vendor/acme/ui-kit/resources/views";3Verify
Rebuild, reload, and check in dev tools that a rule for the class now exists.
npm run buildConfirmed by tailwindcss.com
How do I stop it coming back?
- When you remove an outline, add your own visible focus style so keyboard users can see where they are.
- After a major Tailwind upgrade, run the official upgrade guide's renames over your views.
- Write full class names; never build them with string pieces.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Web apps
group-focus classes in a Tailwind page do nothing when the field is focused
The class is in the HTML, but the built CSS has no rule for it
group-focus styles the target only while the element that carries the group class has focus itself.
4 causes, each with a fixWeb apps
Tailwind md:, lg: and sm: classes do not override as expected
md:flex still applies on large screens
Tailwind is mobile-first: a plain class applies at every width, and sm:, md: or lg: applies at that width and above.
3 causes, each with a fixWeb apps
There is no tailwind.config.js after installing Tailwind 4 and HeroUI in Next.js
HeroUI components render unstyled
Nothing is broken: Tailwind CSS 4 is configured in CSS and no longer creates tailwind.config.js.
3 causes, each with a fixWeb apps
Laravel cannot find a Sass or JS entry in the Vite manifest
Unable to locate file in Vite manifest: resources/sass/app.scss
The @vite directive asks the built manifest for a file, and that file is listed only if it is an entry in the laravel() input option and the assets were built after adding it.
3 causes, each with a fixWeb apps
Hydration failed after adding next-themes dark mode
Console reports a server and client mismatch on the html element
next-themes changes the html element and knows the theme only in the browser, so server HTML and client HTML differ.
3 causes, each with a fixWeb apps
Next.js fails with Cannot find module 'tailwindcss'
Error: Cannot find module 'tailwindcss'
Next.js loads Tailwind through PostCSS, so the error means the package named in postcss.config is not installed where the build runs.
3 causes, each with a fix