Skip to content

Commit

Permalink
feat: add :focus-within style to .input (#2363)
Browse files Browse the repository at this point in the history
* apply input focus styles to the :focus-inner selector

* apply :focus-within to input
  • Loading branch information
Tronikelis committed Sep 27, 2023
1 parent 39ca0a8 commit cac7938
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/components/styled/input.css
Expand Up @@ -6,55 +6,64 @@
&-bordered {
@apply border-opacity-20;
}
&:focus {
&:focus,
&:focus-within {
@apply outline-base-content/20 outline outline-2 outline-offset-2;
}
&-ghost {
@apply bg-opacity-5;
&:focus {
&:focus,
&:focus-within {
@apply text-base-content bg-opacity-100;
box-shadow: none;
}
}
&-primary {
@apply border-primary;
&:focus {
&:focus,
&:focus-within {
@apply outline-primary;
}
}
&-secondary {
@apply border-secondary;
&:focus {
&:focus,
&:focus-within {
@apply outline-secondary;
}
}
&-accent {
@apply border-accent;
&:focus {
&:focus,
&:focus-within {
@apply outline-accent;
}
}
&-info {
@apply border-info;
&:focus {
&:focus,
&:focus-within {
@apply outline-info;
}
}
&-success {
@apply border-success;
&:focus {
&:focus,
&:focus-within {
@apply outline-success;
}
}
&-warning {
@apply border-warning;
&:focus {
&:focus,
&:focus-within {
@apply outline-warning;
}
}
&-error {
@apply border-error;
&:focus {
&:focus,
&:focus-within {
@apply outline-error;
}
}
Expand Down

0 comments on commit cac7938

Please sign in to comment.