-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default focus style to styled Checkbox #2099
Add default focus style to styled Checkbox #2099
Conversation
src/app/components/Checkbox.tsx
Outdated
@@ -48,6 +48,11 @@ const Checkbox = ({children, className, ...props}: React.PropsWithChildren<Props | |||
{children} | |||
</label>; | |||
|
|||
const defaultFocusOutline = ` | |||
outline: 0.1rem dotted #212121; | |||
outline: 0.5rem auto -webkit-focus-ring-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent the styles by one please
src/app/components/Checkbox.tsx
Outdated
@@ -48,6 +48,11 @@ const Checkbox = ({children, className, ...props}: React.PropsWithChildren<Props | |||
{children} | |||
</label>; | |||
|
|||
const defaultFocusOutline = ` | |||
outline: 0.1rem dotted #212121; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the dotted style is the firefox style, chrome has a blue gradient thing, is it possible to use the default focus styles here implicitly or do we have to use a custom style? or is that what you're doing by defining both the dotted and the webkit at the same time like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I depended on this StackOverflow post, which suggests that you have to spec it. initial
does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok... yea i don't see a simpler solution here since we're doing a hidden-checkbox situation. you may want to just throw that stack overflow link in a comment above the defaultFocusOutline
style
5b86f13
to
c60b61e
Compare
c657567
to
d9c839f
Compare
@RoyEJohnson The CI check |
9083e69
to
ccc4049
Compare
For: https://github.com/openstax/unified/issues/2713