Fix focus ring shape on input-group children

The global :focus-visible outline was drawing a square border around the
inner (square-cornered) input, sticking out of the group's rounded
focus-within ring. Suppress child outlines inside .input-group.
This commit is contained in:
2026-07-29 00:29:32 +02:00
parent 9d3261718f
commit 0c6fa47c84
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -1,6 +1,7 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
+7
View File
@@ -31,6 +31,13 @@ a:hover {
outline-offset: 2px;
}
/* Inside an input-group the container draws its own focus-within ring —
suppress the child outlines (the inner input is square-cornered, so its
outline would stick out of the group's rounded shape) */
.input-group :focus-visible {
outline: none;
}
/* Hide the native clear button on search inputs — the pages provide their
own clear button, and Chrome renders both, overlapping the input text */
input[type="search"]::-webkit-search-cancel-button {